Build failure for example application cloud-s4-sdk-book (integration test) - sap-cloud-sdk

I have loaded a sample application for SCP / S/4HANA Business Partner integration, did changes as documented in read.me, I also have comm. user/arrangement in S/4HANA for 0008.
When I try to build it,
I get error during integration test, the content of file com.sap.cloud.s4hana.examples.addressmgr.BusinessPartnerServletTest is:
<<< ERROR! org.jboss.arquillian.container.spi.client.container.DeploymentException: Unable to deploy
Caused by: org.apache.openejb.OpenEJBRuntimeException: org.apache.openejb.OpenEJBException: Creating application failed: /Users/d036682/Downloads/cloud_app/integration-tests/target/surefire-fork/1/arquillian-tomee-working-dir/0/292d95a8-4414-4535-846f-c8fae7dcd7e9: Cannot get Unsafe.defineClass
Caused by: org.apache.openejb.OpenEJBException: Creating application failed: /Users/d036682/Downloads/cloud_app/integration-tests/target/surefire-fork/1/arquillian-tomee-working-dir/0/292d95a8-4414-4535-846f-c8fae7dcd7e9: Cannot get Unsafe.defineClass
Caused by: java.lang.IllegalStateException: Cannot get Unsafe.defineClass
Caused by: java.lang.NoSuchMethodException: sun.misc.Unsafe.defineClass(java.lang.String,[B,int,int,java.lang.ClassLoader,java.security.ProtectionDomain)
Could you please help
Thanks,
Konstantin

Please make sure to use JDK 8 as documented until further notice. Various dependencies don't work in later versions as of now.
Kind regards
Florian

Related

Websphere 8.5 - ArrayIndexOutofBoundsException while starting application

I've managed to deploy a simple Web application to Websphere 8.5, but unable to start it. It throws an ArrayIndexOutofBoundsException while starting my application.
We have been using Tomcat7 so far for our web app. It's a simple web-app with JSPs, JSs and Servlets.
I've tried a lot of options to deploy the application on Websphere, but the latest hurdle i'm facing is the ArrayIndexOutofBoundsException.
I tried to deploy the same application (a mini version) which contained only one servlet, and it was successful. But when I have multiple servlets, I get this exception. Below is my stack trace
[8/12/14 12:15:55:463 IST] 00000046 BeansDeployer E BeansDeployer deploy
java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException
at org.apache.webbeans.portable.AnnotatedElementFactory.newAnnotatedType(AnnotatedElementFactory.java:150)
at org.apache.webbeans.config.BeansDeployer.deployFromClassPath(BeansDeployer.java:484)
at org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:171)
at org.apache.webbeans.lifecycle.AbstractLifeCycle.startApplication(AbstractLifeCycle.java:124)
at org.apache.webbeans.web.lifecycle.WebContainerLifecycle.startApplication(WebContainerLifecycle.java:78)
at com.ibm.ws.webbeans.common.CommonLifeCycle.startApplication(CommonLifeCycle.java:106)
at com.ibm.ws.webbeans.services.JCDIServletContainerInitializer.onStartup(JCDIServletContainerInitializer.java:85)
at com.ibm.ws.webcontainer.webapp.WebAppImpl.initializeServletContainerInitializers(WebAppImpl.java:613)
at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:409)
at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:169)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:749)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:634)
at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:426)
at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:718)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1175)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1370)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:968)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:774)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2182)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:445)
at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:388)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:116)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:994)
at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:502)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1862)
Caused by: java.lang.ArrayIndexOutOfBoundsException
at org.apache.webbeans.portable.AbstractAnnotatedCallable.setAnnotatedParameters(AbstractAnnotatedCallable.java:66)
at org.apache.webbeans.portable.AnnotatedConstructorImpl.<init>(AnnotatedConstructorImpl.java:56)
at org.apache.webbeans.portable.AnnotatedElementFactory.newAnnotatedType(AnnotatedElementFactory.java:117)
... 27 more
I read a couple of other posts from people who faced more or less the same problem, but they were talking about Spring or Guava, none of which I use here. As a result, the solutions I read there did not solve my problem.
Can any one throw light on a solution? It would be helpful to a very great extent.
Additional Info:
I'm developing my project on Eclipse Kepler and using the Webshpere 8.5 plugin to deploy on Websphere application server.
Thanks,
Sriram
Actually it turns out my project was indeed referencing to guava. It was using guava version 15.0. I changed the version to 16.0 and included then in my shared library.. and it solves the issue. Apologies for overlooking guava.. old have saved a lot of time !!

Caused By: java.lang.ClassNotFoundException: com.sun.faces.config.ConfigureListener

I want to create a project with primefaces, I made a simple example of hello world, but I can not deploy the war that I'm building, I did it with eclipse and weblogic, when placed in the server I get the following error:
Caused By: java.lang.ClassNotFoundException: com.sun.faces.config.ConfigureListener
What am I doing wrong? new i'm sorry if it's something very basic.
Thank you!
Hello to everybody i found the answer !!!
http://wiki.flexive.org/confluence/display/FX/Deploy+in+WebLogic+10.3
maybe can help to somebody!!!!

How to add Log4j to Eclipse RCP project

I made a plug-in project from this article.
Then I add this plug-in into my project. However, when I try to use it,
I got the following error:
java.lang.NoClassDefFoundError: org/apache/sel4j/log4j/api/LoggerFactory
Caused by: java.lang.ClassNotFoundException: org.apache.sel4j.log4j.api.LoggerFactory
What should I do?
Do you have the same setup as on this screenshot?:
Note, that you need to add your jars to the classpath as shown on the screenshot and not as you would usually do it for your Java application: Right Click-> Add to build path.
Also, I would like to suggest using this article for setting up logging with Eclipse-RCP for the first time. It is more complete and precise.

DOTS Task Generates error on load

I'm running Domino 9.0.1 and was attempting to load up the DOTS task. Getting an exception when attempting to load it. From the below it seems DOTS isn't installed. Thought it was part of the default installation for XWork/ Domino 9x releases. Do I need to follow the install steps for 8.5.3, another installer to use?
Exception in thread "main" java.lang.NoClassDefFoundError: com.ibm.dots.launcher.OSGiProfile
Caused by: java.lang.ClassNotFoundException: com.ibm.dots.launcher.OSGiProfile
at java.net.URLClassLoader.findClass(URLClassLoader.java:434)
at java.lang.ClassLoader.loadClass(ClassLoader.java:672)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:358)
at java.lang.ClassLoader.loadClass(ClassLoader.java:638)
Unable to access OSGiProfile class, make sure the launcher.jar is in osgi-dots directory
thanks
-Mark
The DOTS extension started its life as an OpeNTF project by the ingenious David Taieb, because he could and was later adopted for use with the OpenSocial Extensions (the part that renders the Embedded Experiences). So you need to have one of the two installed to get it to work. On a 9.0x server the social extensions are most current DOTS.

Cloudbees RUN#Cloud: Could not hook log4j errors

On RUN#Cloud I have the following trace from the staxnet startup:
WARNING: Could not hook log4j errors
java.lang.NoClassDefFoundError: org/apache/log4j/AppenderSkeleton
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at com.staxnet.appserver.jmx.ApplicationObjectFactory$InjectableClassLoader.initClass(ApplicationObjectFactory.java:75)
at com.staxnet.appserver.jmx.ApplicationObjectFactory$InjectableClassLoader.loadClass(ApplicationObjectFactory.java:58)
at java.lang.ClassLoader.loadClass(Unknown Source)
at com.staxnet.appserver.jmx.ApplicationObjectFactory.loadApplicationClass(ApplicationObjectFactory.java:37)
at com.staxnet.appserver.jmx.ApplicationObjectFactory.createApplicationObject(ApplicationObjectFactory.java:21)
at com.staxnet.appserver.jmx.AppManagementContext.hookLog4JEvents(AppManagementContext.java:60)
at com.staxnet.appserver.jmx.AppManagementContext.onBeforeContextInitialized(AppManagementContext.java:50)
at com.staxnet.appserver.jmx.AppManagementContext.containerEvent(AppManagementContext.java:31)
I understand that it is because I don't have log4j in my application, but this is intentional because we use slf4j+logback which works properly.
It doesn't seem to prevent applications from starting nor functionning, but we cannot add log4j as it conflicts with our logging.
Does this makes us miss some important log coming from the staxnet server?
We have papertrail with notifications and we want to be notified of errors occuring during start-up.
Answer from cloudbees support:
Hi Gaspard,
you can safely ignore this error.
This is caused by a platform component that was introduced long time
ago trying to better integrate with application logs. Nowadays, we
rely on Papertrail add-on for this feature. This is kept on platform
to ensure backward compatibility for oldest applications we host.
Nicolas De Loof CloudBees, Inc

Resources