activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tobinibot <tobini...@gmail.com>
Subject Every other message put is failing
Date Mon, 04 Dec 2006 16:37:00 GMT

I just got ActiveMQ (4.1.0), JBoss (4.0.5), and EJB3 (on Windows XP with Java
1.5.0_09) all working together.  When I start everything up, the first
message is successfully put the the queue.  The next one I send fails.  Then
the next one works.  And the next one fails again.  And so on and so forth.


Here is the exception from the ActiveMQ log:


2006-12-04 11:06:02,687 [/127.0.0.1:2490] DEBUG Service                       
- Async error occurred:
java.lang.NullPointerException
	at
org.apache.activemq.broker.TransportConnection.processBeginTransaction(TransportConnection.java:360)
	at
org.apache.activemq.command.TransactionInfo.visit(TransactionInfo.java:93)
	at
org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:284)
	at
org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:177)
	at
org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:65)
	at
org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:133)
	at
org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:122)
	at
org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:84)
	at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:137)
	at java.lang.Thread.run(Thread.java:595)


And here is the stack trace from JBoss (including the first put that is
successful):


11:05:57,656 INFO  [PostCapacityPublicBean] (public) putting message to
queue
11:05:57,703 INFO  [PostCapacityPublicBean] (public) created a connection
11:05:57,734 INFO  [PostCapacityPublicBean] (public) created a session
11:05:57,734 INFO  [PostCapacityPublicBean] (public) created a producer
11:05:57,750 INFO  [PostCapacityPublicBean] (public) sending message...
11:05:57,750 INFO  [PostCapacityPublicBean] (public) message sent!
11:06:02,671 INFO  [PostCapacityPublicBean] (public) putting message to
queue
11:06:02,671 INFO  [PostCapacityPublicBean] (public) created a connection
11:06:02,703 WARN  [ActiveMQManagedConnection] Connection failed:
javax.jms.JMSException: java.lang.NullPointerException
11:06:02,703 WARN  [TxConnectionManager] Connection error occured:
org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@39b27b[state=NORMAL
mc=org.apache.activemq.ra.ActiveMQManagedConnection@154145 handles=1
lastUse=1165248357828 permit=true trackByTx=true
mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$PoolBySubjectAndCri@17035c6
context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@1da997a
xaResource=org.apache.activemq.ra.ActiveMQManagedConnection$1@921a90
txSync=null]
javax.jms.JMSException: java.lang.NullPointerException
        at
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:46)
        at
org.apache.activemq.ActiveMQConnection.onAsyncException(ActiveMQConnection.java:1447)
        at
org.apache.activemq.ActiveMQConnection$2.run(ActiveMQConnection.java:1420)
        at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
        at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
        at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.NullPointerException
        at
org.apache.activemq.broker.TransportConnection.processBeginTransaction(TransportConnection.java:360)
        at
org.apache.activemq.command.TransactionInfo.visit(TransactionInfo.java:93)
        at
org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:284)
        at
org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:177)
        at
org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:65)
        at
org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:133)
        at
org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:122)
        at
org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:84)
        at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:137)
        ... 1 more
11:06:02,703 INFO  [PostCapacityPublicBean] (public) created a session
11:06:03,015 ERROR [STDERR] javax.jms.IllegalStateException: The Session is
closed
11:06:03,015 ERROR [STDERR] 	at
org.apache.activemq.ra.ManagedSessionProxy.getSession(ManagedSessionProxy.java:93)
11:06:03,015 ERROR [STDERR] 	at
org.apache.activemq.ra.ManagedSessionProxy.createProducer(ManagedSessionProxy.java:225)
11:06:03,015 ERROR [STDERR] 	at
org.apache.activemq.ActiveMQQueueSession.createProducer(ActiveMQQueueSession.java:198)
11:06:03,015 ERROR [STDERR] 	at
com.xxxxxx.xxx.ejb.PostCapacityPublicBean.putCapacityOnQueue(PostCapacityPublicBean.java:43)
11:06:03,015 ERROR [STDERR] 	at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
11:06:03,015 ERROR [STDERR] 	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
11:06:03,015 ERROR [STDERR] 	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
11:06:03,015 ERROR [STDERR] 	at
java.lang.reflect.Method.invoke(Method.java:585)
11:06:03,015 ERROR [STDERR] 	at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
11:06:03,015 ERROR [STDERR] 	at
org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
11:06:03,015 ERROR [STDERR] 	at
org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
11:06:03,015 ERROR [STDERR] 	at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
11:06:03,515 ERROR [STDERR] 	at
org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
11:06:03,515 ERROR [STDERR] 	at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
11:06:03,515 ERROR [STDERR] 	at
org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
11:06:03,515 ERROR [STDERR] 	at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
11:06:03,515 ERROR [STDERR] 	at
org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
11:06:03,515 ERROR [STDERR] 	at
org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:201)
11:06:03,515 ERROR [STDERR] 	at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
11:06:03,515 ERROR [STDERR] 	at
org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
11:06:04,015 ERROR [STDERR] 	at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
11:06:04,015 ERROR [STDERR] 	at
org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
11:06:04,015 ERROR [STDERR] 	at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
11:06:04,015 ERROR [STDERR] 	at
org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
11:06:04,015 ERROR [STDERR] 	at
org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:131)
11:06:04,515 ERROR [STDERR] 	at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
11:06:04,515 ERROR [STDERR] 	at
org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
11:06:04,515 ERROR [STDERR] 	at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
11:06:04,515 ERROR [STDERR] 	at
org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
11:06:04,515 ERROR [STDERR] 	at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
11:06:04,515 ERROR [STDERR] 	at
org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:211)
11:06:04,515 ERROR [STDERR] 	at
org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:79)
11:06:04,515 ERROR [STDERR] 	at $Proxy79.putCapacityOnQueue(Unknown Source)
11:06:04,515 ERROR [STDERR] 	at
com.xxxxxx.xxx.web.UniversalAdapterService.postCapacity(UniversalAdapterService.java:33)
11:06:04,515 ERROR [STDERR] 	at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
11:06:04,515 ERROR [STDERR] 	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
11:06:04,515 ERROR [STDERR] 	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
11:06:04,515 ERROR [STDERR] 	at
java.lang.reflect.Method.invoke(Method.java:585)
11:06:04,515 ERROR [STDERR] 	at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
11:06:04,515 ERROR [STDERR] 	at
org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
11:06:04,515 ERROR [STDERR] 	at
org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
11:06:04,515 ERROR [STDERR] 	at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
11:06:04,515 ERROR [STDERR] 	at
org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
11:06:04,515 ERROR [STDERR] 	at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
11:06:04,531 ERROR [STDERR] 	at
org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
11:06:04,531 ERROR [STDERR] 	at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
11:06:04,531 ERROR [STDERR] 	at
org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
11:06:04,531 ERROR [STDERR] 	at
org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197)
11:06:05,031 ERROR [STDERR] 	at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
11:06:05,031 ERROR [STDERR] 	at
org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
11:06:05,031 ERROR [STDERR] 	at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
11:06:05,031 ERROR [STDERR] 	at
org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
11:06:05,031 ERROR [STDERR] 	at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
11:06:05,031 ERROR [STDERR] 	at
org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
11:06:05,531 ERROR [STDERR] 	at
org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:131)
11:06:05,531 ERROR [STDERR] 	at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
11:06:05,531 ERROR [STDERR] 	at
org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
11:06:05,531 ERROR [STDERR] 	at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
11:06:05,531 ERROR [STDERR] 	at
org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
11:06:06,031 ERROR [STDERR] 	at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
11:06:06,031 ERROR [STDERR] 	at
org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:211)
11:06:06,031 ERROR [STDERR] 	at
org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:173)
11:06:06,031 ERROR [STDERR] 	at
org.jboss.ws.integration.jboss.ServiceEndpointInvokerEJB3.invokeServiceEndpoint(ServiceEndpointInvokerEJB3.java:126)
11:06:06,031 ERROR [STDERR] 	at
org.jboss.ws.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:115)
11:06:06,531 ERROR [STDERR] 	at
org.jboss.ws.server.ServiceEndpoint.handleRequest(ServiceEndpoint.java:209)
11:06:06,531 ERROR [STDERR] 	at
org.jboss.ws.server.ServiceEndpointManager.processSOAPRequest(ServiceEndpointManager.java:355)
11:06:06,531 ERROR [STDERR] 	at
org.jboss.ws.server.StandardEndpointServlet.doPost(StandardEndpointServlet.java:115)
11:06:06,531 ERROR [STDERR] 	at
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
11:06:06,531 ERROR [STDERR] 	at
org.jboss.ws.server.StandardEndpointServlet.service(StandardEndpointServlet.java:76)
11:06:06,531 ERROR [STDERR] 	at
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
11:06:06,531 ERROR [STDERR] 	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
11:06:06,531 ERROR [STDERR] 	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
11:06:07,031 ERROR [STDERR] 	at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
11:06:07,031 ERROR [STDERR] 	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
11:06:07,031 ERROR [STDERR] 	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
11:06:07,031 ERROR [STDERR] 	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
11:06:07,031 ERROR [STDERR] 	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
11:06:07,531 ERROR [STDERR] 	at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
11:06:07,531 ERROR [STDERR] 	at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
11:06:07,531 ERROR [STDERR] 	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
11:06:07,531 ERROR [STDERR] 	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
11:06:07,531 ERROR [STDERR] 	at
org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
11:06:07,531 ERROR [STDERR] 	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
11:06:07,531 ERROR [STDERR] 	at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
11:06:08,031 ERROR [STDERR] 	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
11:06:08,031 ERROR [STDERR] 	at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
11:06:08,031 ERROR [STDERR] 	at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
11:06:08,031 ERROR [STDERR] 	at
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
11:06:08,031 ERROR [STDERR] 	at java.lang.Thread.run(Thread.java:595)
11:06:08,031 WARN  [TransactionImpl] XAException:
tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=tjuday/15, BranchQual=,
localId=15] errorCode=XAER_RMFAIL
javax.transaction.xa.XAException: The connection is already closed
        at
org.apache.activemq.TransactionContext.toXAException(TransactionContext.java:592)
        at
org.apache.activemq.TransactionContext.commit(TransactionContext.java:454)
        at
org.apache.activemq.ra.LocalAndXATransaction.commit(LocalAndXATransaction.java:85)
        at
org.jboss.tm.TransactionImpl$Resource.commit(TransactionImpl.java:2253)
        at
org.jboss.tm.TransactionImpl.commitResources(TransactionImpl.java:1784)
        at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:340)
        at org.jboss.tm.TxManager.commit(TxManager.java:240)
        at org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:175)
        at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:87)
        at
org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197)
        at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
        at
org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
        at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
        at
org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
        at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
        at
org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
        at
org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:131)
        at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
        at
org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
        at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
        at
org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
        at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
        at
org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:211)
        at
org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:173)
        at
org.jboss.ws.integration.jboss.ServiceEndpointInvokerEJB3.invokeServiceEndpoint(ServiceEndpointInvokerEJB3.java:126)
        at
org.jboss.ws.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:115)
        at
org.jboss.ws.server.ServiceEndpoint.handleRequest(ServiceEndpoint.java:209)
        at
org.jboss.ws.server.ServiceEndpointManager.processSOAPRequest(ServiceEndpointManager.java:355)
        at
org.jboss.ws.server.StandardEndpointServlet.doPost(StandardEndpointServlet.java:115)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at
org.jboss.ws.server.StandardEndpointServlet.service(StandardEndpointServlet.java:76)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
        at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at
org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
        at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
        at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
        at java.lang.Thread.run(Thread.java:595)
Caused by: org.apache.activemq.ConnectionClosedException: The connection is
already closed
        at
org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1111)
        at
org.apache.activemq.TransactionContext.commit(TransactionContext.java:443)
        ... 49 more
11:06:08,531 WARN  [TransactionImpl] XAException:
tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=tjuday/15, BranchQual=,
localId=15] errorCode=XAER_RMFAIL
javax.transaction.xa.XAException: The connection is already closed
        at
org.apache.activemq.TransactionContext.toXAException(TransactionContext.java:592)
        at
org.apache.activemq.TransactionContext.rollback(TransactionContext.java:415)
        at
org.apache.activemq.ra.LocalAndXATransaction.rollback(LocalAndXATransaction.java:127)
        at
org.jboss.tm.TransactionImpl$Resource.rollback(TransactionImpl.java:2277)
        at
org.jboss.tm.TransactionImpl.rollbackResources(TransactionImpl.java:1837)
        at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:368)
        at org.jboss.tm.TxManager.commit(TxManager.java:240)
        at org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:175)
        at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:87)
        at
org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197)
        at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
        at
org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
        at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
        at
org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
        at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
        at
org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
        at
org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:131)
        at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
        at
org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
        at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
        at
org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
        at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
        at
org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:211)
        at
org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:173)
        at
org.jboss.ws.integration.jboss.ServiceEndpointInvokerEJB3.invokeServiceEndpoint(ServiceEndpointInvokerEJB3.java:126)
        at
org.jboss.ws.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:115)
        at
org.jboss.ws.server.ServiceEndpoint.handleRequest(ServiceEndpoint.java:209)
        at
org.jboss.ws.server.ServiceEndpointManager.processSOAPRequest(ServiceEndpointManager.java:355)
        at
org.jboss.ws.server.StandardEndpointServlet.doPost(StandardEndpointServlet.java:115)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at
org.jboss.ws.server.StandardEndpointServlet.service(StandardEndpointServlet.java:76)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
        at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at
org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
        at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
        at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
        at java.lang.Thread.run(Thread.java:595)
Caused by: org.apache.activemq.ConnectionClosedException: The connection is
already closed
        at
org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1111)
        at
org.apache.activemq.TransactionContext.rollback(TransactionContext.java:404)
        ... 49 more
11:06:08,593 ERROR [SOAPFaultExceptionHelper] SOAP request exception
java.lang.RuntimeException: org.jboss.tm.JBossRollbackException: Unable to
commit, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=tjuday/15,
BranchQual=, localId=15] status=STATUS_NO_TRANSACTION; - nested throwable:
(javax.transaction.xa.XAException: The connection is already closed)
        at
org.jboss.aspects.tx.TxPolicy.handleEndTransactionException(TxPolicy.java:198)
        at org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:180)
        at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:87)
        at
org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197)
        at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
        at
org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
        at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
        at
org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
        at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
        at
org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
        at
org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:131)
        at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
        at
org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
        at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
        at
org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
        at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
        at
org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:211)
        at
org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:173)
        at
org.jboss.ws.integration.jboss.ServiceEndpointInvokerEJB3.invokeServiceEndpoint(ServiceEndpointInvokerEJB3.java:126)
        at
org.jboss.ws.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:115)
        at
org.jboss.ws.server.ServiceEndpoint.handleRequest(ServiceEndpoint.java:209)
        at
org.jboss.ws.server.ServiceEndpointManager.processSOAPRequest(ServiceEndpointManager.java:355)
        at
org.jboss.ws.server.StandardEndpointServlet.doPost(StandardEndpointServlet.java:115)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at
org.jboss.ws.server.StandardEndpointServlet.service(StandardEndpointServlet.java:76)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
        at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at
org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
        at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
        at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
        at java.lang.Thread.run(Thread.java:595)
Caused by: org.jboss.tm.JBossRollbackException: Unable to commit,
tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=tjuday/15, BranchQual=,
localId=15] status=STATUS_NO_TRANSACTION; - nested throwable:
(javax.transaction.xa.XAException: The connection is already closed)

        at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:372)
        at org.jboss.tm.TxManager.commit(TxManager.java:240)
        at org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:175)
        ... 43 more
Caused by: javax.transaction.xa.XAException: The connection is already
closed
        at
org.apache.activemq.TransactionContext.toXAException(TransactionContext.java:592)
        at
org.apache.activemq.TransactionContext.commit(TransactionContext.java:454)
        at
org.apache.activemq.ra.LocalAndXATransaction.commit(LocalAndXATransaction.java:85)
        at
org.jboss.tm.TransactionImpl$Resource.commit(TransactionImpl.java:2253)
        at
org.jboss.tm.TransactionImpl.commitResources(TransactionImpl.java:1784)
        at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:340)
        ... 45 more
Caused by: org.apache.activemq.ConnectionClosedException: The connection is
already closed
        at
org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1111)
        at
org.apache.activemq.TransactionContext.commit(TransactionContext.java:443)
        ... 49 more
11:06:09,109 INFO  [CachedConnectionManager] Closing a connection for you. 
Please close them yourself:
org.apache.activemq.ra.ManagedConnectionProxy@1dbac11


And finally, here is the code that is actually trying the put the message on
the queue:


@Stateless
public class PostCapacityPublicBean implements
com.xxxxxx.xxx.ejb.PostCapacityPublicLocal {
  private Logger logger = Logger.getLogger(PostCapacityPublicBean.class);
  
  @Resource(mappedName="java:activemq/QueueConnectionFactory")
  private ConnectionFactory factory;
  
  @Resource(mappedName="activemq/queue/capacity")
  private Queue queue;
  
  public void putCapacityOnQueue(String messageId, String carrierId) {
    logger.info("(public) putting message to queue");
    
    //Queue queue = null;
    QueueConnection connection = null;
    QueueSession session = null;
    MessageProducer messageProducer = null;
    try {  
      connection = ((QueueConnectionFactory)
factory).createQueueConnection();
      logger.info("(public) created a connection");
      session = connection.createQueueSession(false,
QueueSession.AUTO_ACKNOWLEDGE);
      logger.info("(public) created a session");
      messageProducer = session.createProducer(queue);
      logger.info("(public) created a producer");
      
      TextMessage msg = session.createTextMessage();
      
      msg.setText("(public) this is a message from the web service");
      logger.info("(public) sending message...");
      messageProducer.send(msg);
      logger.info("(public) message sent!");
      
      messageProducer.close();
      session.close();
      connection.close();
    } catch (JMSException ex) {
      ex.printStackTrace();
    }
  }
}


Sorry about the length of the JBoss exception.  The support page says to
post the whole stack trace, and the end is sort of interesting, I think. 
>From what I can tell, I am closing the connection.  Am I doing something
wrong here?


I'd be happy to provide more logs/details if that would help.  Thanks!


Tobin

-- 
View this message in context: http://www.nabble.com/Every-other-message-put-is-failing-tf2754821.html#a7681713
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

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