activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Bain <tb...@alumni.duke.edu>
Subject Re: Exception in createSesson() inside an EJB user transaction
Date Thu, 17 Mar 2016 13:34:56 GMT
I see java.lang.AbstractMethodError:
org.apache.activemq.ra.ManagedConnectionProxy.createSession()Ljavax/jms/Session;
in the logs, which implies that the version of that class at runtime is
different than what you compiled against. (source:
http://stackoverflow.com/questions/17969365/why-i-am-getting-java-lang-abstractmethoderror-errors
)

Is there any chance you upgraded the RA JAR without recompiling, and that
your code won't compile against the latest version?  Alternatively, might
there be two copies of that class with different versions on the classpath,
such that the JVM might be finding the wrong one?
On Mar 16, 2016 8:29 AM, "THMayr" <Thomas.Mayr@adesso.de> wrote:

> Hi,
>
> I get an exception creating a session in a MDB when the session is created
> inside a user transaction. The code sequence in the MDB looks like this:
>
> connectionFactory = (ConnectionFactory)
> environmentContext.lookup("jms/ConnectionFactory");
> ejbContext           = (MessageDrivenContext)
> initialContext.lookup("java:comp/EJBContext");
> userTransaction    = ejbContext.getUserTransaction ();
> userTransaction.setTransactionTimeout (60000);
> userTransaction.begin ();
> connection = connectionFactory.createConnection ();
> connection.start ();
> session = connection.createSession ();
> ...
> userTransaction.commit ();
>
> When I remove /userTransaction.begin () /and /userTransaction.commit ()/ it
> works. The MDB is deployed on a WildFly 10.0.0 and the ActiveMQ resource
> adapter activemq-rar-5.13.1.rar is deployed.
>
> Another interesting error message may be this one, which is printed after
> /onMessage()/ is left:
>
> 11:10:08,426 ERROR
> [org.jboss.jca.core.connectionmanager.listener.TxConnectionListener]
> (default-threads - 8) IJ000315: Pool ConnectionFactory has 1 active handles
>
> Any ideas what is going wrong or missing here?
>
> Here the stack trace:
>
> 11:10:08,357 INFO  [stdout] (default-threads - 8) TestMessageBeanLow, Low
> Priority 0: Exception occurred:
>
> org.apache.activemq.ra.ManagedConnectionProxy.createSession()Ljavax/jms/Session;
> 11:10:08,359 ERROR [stderr] (default-threads - 8)
> java.lang.AbstractMethodError:
>
> org.apache.activemq.ra.ManagedConnectionProxy.createSession()Ljavax/jms/Session;
> 11:10:08,359 ERROR [stderr] (default-threads - 8)       at
> de.adesso.tma.test.ejb.TestMessageBean.onMessage(TestMessageBean.java:212)
> 11:10:08,359 ERROR [stderr] (default-threads - 8)       at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 11:10:08,360 ERROR [stderr] (default-threads - 8)       at
> sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> 11:10:08,361 ERROR [stderr] (default-threads - 8)       at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> 11:10:08,361 ERROR [stderr] (default-threads - 8)       at
> java.lang.reflect.Method.invoke(Unknown Source)
> 11:10:08,363 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)
> 11:10:08,363 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> 11:10:08,364 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:437)
> 11:10:08,365 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:82)
> 11:10:08,366 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:93)
> 11:10:08,366 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
> 11:10:08,367 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> 11:10:08,367 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43)
> 11:10:08,369 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> 11:10:08,369 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.as.ejb3.tx.EjbBMTInterceptor.handleInvocation(EjbBMTInterceptor.java:103)
> 11:10:08,370 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.as.ejb3.tx.BMTInterceptor.processInvocation(BMTInterceptor.java:58)
> 11:10:08,370 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> 11:10:08,372 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:437)
> 11:10:08,372 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:73)
> 11:10:08,373 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:83)
> 11:10:08,374 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> 11:10:08,376 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45)
> 11:10:08,376 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> 11:10:08,378 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)
> 11:10:08,378 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> 11:10:08,379 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
> 11:10:08,379 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:52)
> 11:10:08,380 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> 11:10:08,381 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51)
> 11:10:08,382 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> 11:10:08,383 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
> 11:10:08,384 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> 11:10:08,384 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:43)
> 11:10:08,385 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> 11:10:08,386 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.as.ejb3.security.AuthorizationInterceptor.processInvocation(AuthorizationInterceptor.java:138)
> 11:10:08,387 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> 11:10:08,387 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:100)
> 11:10:08,388 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> 11:10:08,388 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)
> 11:10:08,390 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> 11:10:08,390 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.as.ejb3.deployment.processors.EjbSuspendInterceptor.processInvocation(EjbSuspendInterceptor.java:53)
> 11:10:08,391 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> 11:10:08,392 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:66)
> 11:10:08,393 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> 11:10:08,393 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
> 11:10:08,394 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> 11:10:08,395 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:54)
> 11:10:08,396 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> 11:10:08,396 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponentDescription$5$1.processInvocation(MessageDrivenComponentDescription.java:239)
> 11:10:08,397 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> 11:10:08,398 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:64)
> 11:10:08,399 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> 11:10:08,399 ERROR [stderr] (default-threads - 8)       at
> org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:356)
> 11:10:08,400 ERROR [stderr] (default-threads - 8)       at
>
> org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:636)
> 11:10:08,400 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.invocation.AccessCheckingInterceptor.processInvocation(AccessCheckingInterceptor.java:61)
> 11:10:08,402 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> 11:10:08,402 ERROR [stderr] (default-threads - 8)       at
> org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:356)
> 11:10:08,403 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.invocation.PrivilegedWithCombinerInterceptor.processInvocation(PrivilegedWithCombinerInterceptor.java:80)
> 11:10:08,404 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> 11:10:08,405 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
> 11:10:08,405 ERROR [stderr] (default-threads - 8)       at
> org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:195)
> 11:10:08,406 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:185)
> 11:10:08,407 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> 11:10:08,408 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
> 11:10:08,408 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:73)
> 11:10:08,410 ERROR [stderr] (default-threads - 8)       at
> de.adesso.tma.test.ejb.TestMessageBean$$$view10.onMessage(Unknown Source)
> 11:10:08,410 ERROR [stderr] (default-threads - 8)       at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 11:10:08,411 ERROR [stderr] (default-threads - 8)       at
> sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> 11:10:08,411 ERROR [stderr] (default-threads - 8)       at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> 11:10:08,413 ERROR [stderr] (default-threads - 8)       at
> java.lang.reflect.Method.invoke(Unknown Source)
> 11:10:08,413 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.as.ejb3.inflow.MessageEndpointInvocationHandler.doInvoke(MessageEndpointInvocationHandler.java:139)
> 11:10:08,415 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.as.ejb3.inflow.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:73)
> 11:10:08,415 ERROR [stderr] (default-threads - 8)       at
> de.adesso.tma.test.ejb.TestMessageBean$$$endpoint6.onMessage(Unknown
> Source)
> 11:10:08,416 ERROR [stderr] (default-threads - 8)       at
>
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:123)
> 11:10:08,417 ERROR [stderr] (default-threads - 8)       at
>
> org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:64)
> 11:10:08,418 ERROR [stderr] (default-threads - 8)       at
> org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:1041)
> 11:10:08,418 ERROR [stderr] (default-threads - 8)       at
> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:169)
> 11:10:08,419 ERROR [stderr] (default-threads - 8)       at
> org.jboss.jca.core.workmanager.WorkWrapper.run(WorkWrapper.java:223)
> 11:10:08,419 ERROR [stderr] (default-threads - 8)       at
>
> org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:33)
> 11:10:08,421 ERROR [stderr] (default-threads - 8)       at
> org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:808)
> 11:10:08,421 ERROR [stderr] (default-threads - 8)       at
> org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:45)
> 11:10:08,422 ERROR [stderr] (default-threads - 8)       at
> org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:828)
> 11:10:08,423 ERROR [stderr] (default-threads - 8)       at
> java.lang.Thread.run(Unknown Source)
> 11:10:08,424 ERROR [stderr] (default-threads - 8)       at
> org.jboss.threads.JBossThread.run(JBossThread.java:320)
> 11:10:08,425 INFO  [stdout] (default-threads - 8)
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Exception-in-createSesson-inside-an-EJB-user-transaction-tp4709452.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message