WebSphere: incompatible with javax.resource.spi.ResourceAdapter - websphere

We are trying to deploy an .ear in WAS8.5 Application Server. During the application startup an error is thrown of incompatible ResourceAdapter. The complete stack trace is here.
What could be the possible cause of this? Any pointer would be of great help. Thanks in Advance.
J2CA0043E: An Exception occurred while trying to instantiate a ResourceAdapterJavaBean instance for the installed ResourceAdapter defined by key cells/ux9039Cell01/applications/globalmc-mq-ear.ear/deployments/globalmc-mq-ear/deployment.xml#J2CResourceAdapter_1423058973553.
The exception is: java.lang.ClassCastException: com.gdc.ps.frd.globalmc.ra.NextRecordResourceAdapterImpl incompatible with javax.resource.spi.ResourceAdapter**
at com.ibm.ejs.j2c.RAWrapperImpl.createAndConfigureRA(RAWrapperImpl.java:2236)
at com.ibm.ejs.j2c.RAWrapperImpl.startRA(RAWrapperImpl.java:712)
at com.ibm.ejs.j2c.RALifeCycleManagerImpl.startRA(RALifeCycleManagerImpl.java:1170)
...
FfdcProvider W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDCIncident emitted on /apps/WAS8.5/IBM/WebSphere/AppServer/profiles/FFMNode/logs/ffdc/FFMUxSrvr_87506fa8_15.02.05_04.29.59.6196455942349878479476.txt com.ibm.ejs.j2c.RALifeCycleManagerImpl.startRA 1324
[2/5/15 4:29:59:700 CST] 0000007e RALifeCycleMa E J2CA0128E: An Exception occurred while trying to start ResourceAdapter cells/ux9039Cell01/applications/globalmc-mq-ear.ear/deployments/globalmc-mq-ear/deployment.xml#J2CResourceAdapter_1423058973553. T**he exception is: java.lang.ClassCastException:** com.gdc.ps.frd.globalmc.ra.NextRecordResourceAdapterImpl incompatible with javax.resource.spi.ResourceAdapter
at com.ibm.ejs.j2c.RAWrapperImpl.createAndConfigureRA(RAWrapperImpl.java:2236)
at com.ibm.ejs.j2c.RAWrapperImpl.startRA(RAWrapperImpl.java:712)
at com.ibm.ejs.j2c.RALifeCycleManagerImpl.startRA(RALifeCycleManagerImpl.java:1170)
at com.ibm.ejs.j2c.RALifeCycleManagerImpl.resourceProviderEvent(RALifeCycleManagerImpl.java:884)

The error indicates that com.gdc.ps.frd.globalmc.ra.NextRecordResourceAdapterImpl is not a javax.resource.spi.ResourceAdapter.
Has something in your configuration asserted that this class represents a JCA Resource Adapter? It would appear that it isn't.

I think you have multiple copies of class javax.resource.spi.ResourceAdapter. Basically, multiple jars has the same class which is causing the issue.

Related

Consumer thread error, thread abort on SimpleMessageListenerContainer

I have a application that is running a few months but recently the application is throw a error during receipt message by mq.
When the error is throw the application don't consume more messages. Restarting the application the consume of message is running normaly.
Erro:
4644201:[2018-10-02 10:34:31,068] ERROR [SimpleAsyncTaskExecutor-1] o.s.a.r.l.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:1473) - Consumer thread error, thread abort.
4644418-java.lang.NoClassDefFoundError: org/springframework/classify/SubclassClassifier$ClassComparator
4644514- at org.springframework.classify.SubclassClassifier.classify(SubclassClassifier.java:115)
4644604- at org.springframework.classify.BinaryExceptionClassifier.classify(BinaryExceptionClassifier.java:104)
4644708- at org.springframework.retry.policy.SimpleRetryPolicy.retryForException(SimpleRetryPolicy.java:191)
4644809- at org.springframework.retry.policy.SimpleRetryPolicy.canRetry(SimpleRetryPolicy.java:143)
4644901- at org.springframework.retry.support.RetryTemplate.canRetry(RetryTemplate.java:357)
4644986- at org.springframework.retry.support.RetryTemplate.doExecute(RetryTemplate.java:291)
4645072- at org.springframework.retry.support.RetryTemplate.execute(RetryTemplate.java:172)
4645156- at org.springframework.retry.interceptor.RetryOperationsInterceptor.invoke(RetryOperationsInterceptor.java:98)
4645268- at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
4645378- at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
4645471- at com.sun.proxy.$Proxy89.invokeListener(Unknown Source)
4645529- at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.invokeListener(SimpleMessageListenerContainer.java:1238)
4645662- at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.executeListener(AbstractMessageListenerContainer.java:727)
4645799- at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.doReceiveAndExecute(SimpleMessageListenerContainer.java:1192)
4645937- at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.receiveAndExecute(SimpleMessageListenerContainer.java:1176)
4646073- at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.access$1100(SimpleMessageListenerContainer.java:99)
4646201- at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:1370)
4646354- at java.lang.Thread.run(Thread.java:748)
4646396-Caused by: java.lang.ClassNotFoundException: org.springframework.classify.SubclassClassifier$ClassComparator
You are missing spring-retry on the class path. What are you using for dependency management? It should be added to the classpath automatically when using Maven or Gradle since it's a transitive dependency of spring-amqp.
Restarting the application the consume of message is running normaly.
That makes no sense; unless you have some kind of weird classloader problem.
Try running with -verbose to get logs for all the class loading.

Running rJava within JRI in JBoss

I'm running an R script in Jboss (a java application server) using JRI. Within the R script I have a call to a Java class.
Therefore, this is what I have:
Java program in JBoss --> invokes JRI and runs R script --> invokes Java program.
When I attempt to run the following script in JRI:
s <- .jnew("java/lang/String", "Hello World")
print(s)
The program runs, however throws the following exception:
12:18:16,786 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)
java.lang.NoClassDefFoundError: RJavaClassLoader
12:18:16,786 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) at
org.rosuda.JRI.Rengine.rniEval(Native Method)
12:18:16,786 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) at
org.rosuda.REngine.JRI.JRIEngine.eval(JRIEngine.java:281)
12:18:16,802 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) at
org.rosuda.REngine.REngine.parseAndEval(REngine.java:102)
12:18:16,803 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) at
org.rosuda.REngine.REngine.parseAndEval(REngine.java:108)
The first time I run an rJava statement, I get the exception. From then on, it almost works fine, the main problem is that the environment is not stable, as I see many exceptions from time to time.
I know that is possible to run rJava from within JRI, but is it possible in an application server like Jboss instead of a plain Java object?

FileNotFound exception when launching an empty WebSphere server

There was no project deployed to the Websphere server, and I have yet to enable security feature on the WebSphere Server 7.0.
Could it be from previous attempts to create a server? I've not been successful. The directory C:\myworkspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\ does not exist because I deleted tmp1 folder in an attempt to clean my server environment. Repeat deleted and reinstalling the server does not help.
Here's the stacktrace:
[11/24/14 11:57:00:930 EST] 0000000e ApplicationMg E WSVR0100W: An error occurred initializing, MyApplication
org.eclipse.jst.j2ee.commonarchivecore.internal.exception.NestedJarException: IWAE0008E An error occurred reading MyApplication.war from C:\myWorkspace
Stack trace of nested exception:
java.io.FileNotFoundException: C:\myworkspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\MyApplication (The system cannot find the path specified.)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:112)
at java.io.FileInputStream.<init>(FileInputStream.java:72)
at

java .lang.IllegalArgumentException: PWC1430: Unable to add listener of type

How do you make sense of exceptions like this? It doesn't add up because the CatalogFacade does compile fine, and By the way, I do implement the classes they ask for. "Any of" seems like it's not needed to have all of them.
Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: java.lang.IllegalArgumentException:
Which is Inside this surrounding error message, that seems a bit vague:
[exec] remote failure: Error occurred during deployment: Exception while lo
ading the app : java.lang.IllegalStateException: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: java
.lang.IllegalArgumentException: PWC1430: Unable to add listener of type: com.sun
.javaee.blueprints.petstore.model.CatalogFacade, because it does not implement a
ny of the required ServletContextListener, ServletContextAttributeListener, Serv
letRequestListener, ServletRequestAttributeListener, HttpSessionListener, or Htt
pSessionAttributeListener interfaces. Please see server.log for more details.
[exec] Command deploy failed.
BUILD FAILED
C:\LatestPS\trunk\ws\bp-project\app-server-ant.xml:379: exec returned: 1
I've been trying things all night . It's not clear.
By the way, to the best of my knowledge..there's nothing significant at app-server-ant.xml:379..
Here's the Full log(I know it's quite big):
Some more of files are here : http://www.adelazzam.com/so.html
The problem is there in the error-message. The <listener> you specify in your web.xml, CatalogFacade does not implement the required Listener interface, specified by the servlet specification.
Check the implementation of your CatalogFacade. Depending on what type of listener it should be (that is, what lifecycle events should it be notified of) it must implement one of ServletContextListener, ServletContextAttributeListener, ServletRequestListener, ServletRequestAttributeListener, HttpSessionListener, or HttpSessionAttributeListener.

calling ejb3.0 in action class. application server : websphere7.0 and IDE: RAD7.5

I have written one stateless session bean and deployed in the server. when i tried to access that particular ejb, it's throwing error.
Code sample:
TestServiceBeanRemote : Remore bean
TestServiceBean : Actual bean
Context context = new InitialContext();
TestServiceBeanRemote test = (TestServiceBeanRemote)context.lookup("com.test.ejb.TestServiceBean");
test.hello("ejb3.0");
Error :
[5/23/11 14:27:00:250 IST] 0000001b SystemErr R javax.naming.NameNotFoundException: Context: gopatilbNode01Cell/nodes/gopatilbNode01/servers/server1, name: com.test.ejb.TestServiceBean: First component in name com.test.ejb.TestServiceBean not found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]
[5/23/11 14:27:00:250 IST] 0000001b SystemErr R at com.ibm.ws.naming.jndicos.CNContextImpl.mapNotFoundException(CNContextImpl.java:4365)
**: Do i need to configure anything in was7.0 ? or do i need to write any xml file for jndi lookup in ejb3.0 ? please help.
The default bindings in WebSphere Application Server are the interface name (e.g., com.test.ejb.TestService) and <app>/<module>/<bean>#<interface> (e.g., MyTest.ear/test.jar/TestServiceBean#com.test.ejb.TestService). These can be changed during the deploy process or using ibm-ejb-jar-bnd.xml. More information is available in the EJB 3.0 application bindings overview InfoCenter topic.

Resources