[jboss-user] [JBoss Messaging] - Re: Messages delivery stops after a while

lieth78 do-not-reply at jboss.com
Wed Nov 8 06:47:27 EST 2006


Actually in my test case only one client accesses the web application, and I get the problem even if I start the JBoss server and start a whole new client (so there should not be  any non closed client problem as far as I know).

By the way, I put back into JBoss the web application that contained the poorly optimized code, and I noticed that in fact the "RELIABLE has exceed maximum delivery attempts and will be removed " warn message is not displayed when the delivery stops (at this time, no error is displayed in JBoss logs) but when I stop the client.

Chronologically:
1- After 20 or so messages read invocations by the client the delivery stops but no error message is added to JBoss logs
2- I stop the client: I get this type of errors:
"2006-11-08 12:20:50,075 ERROR [org.jboss.jms.util.ExceptionUtil] SessionEndpoint[-2147483645] cancelDeliveries [aac2v-8uqaop-eu9n2dyy-1-eu9n5hgb-9]
javax.jms.IllegalStateException: Cannot find delivery to cancel:-2147483597
	at org.jboss.jms.server.endpoint.ServerConsumerEndpoint.cancelDelivery(ServerConsumerEndpoint.java:583)
	at org.jboss.jms.server.endpoint.ServerSessionEndpoint.cancelDeliveries(ServerSessionEndpoint.java:482)
	at org.jboss.jms.server.endpoint.advised.SessionAdvised.org$jboss$jms$server$endpoint$advised$SessionAdvised$cancelDeliveries$aop(SessionAdvised.java:136)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
	at org.jboss.jms.server.container.ServerLogInterceptor.invoke(ServerLogInterceptor.java:105)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.aop.Advisor.dynamicInvoke(Advisor.java:723)
	at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:101)
	at org.jboss.jms.server.remoting.JMSServerInvocationHandler.invoke(JMSServerInvocationHandler.java:127)
	at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:1008)
	at org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:98)
	at org.jboss.remoting.Client.invoke(Client.java:589)
	at org.jboss.remoting.Client.invoke(Client.java:581)
	at org.jboss.jms.client.delegate.DelegateSupport.invoke(DelegateSupport.java:111)
	at org.jboss.jms.client.delegate.ClientSessionDelegate$cancelDeliveries_6592991528584912127.invokeNext(ClientSessionDelegate$cancelDeliveries_6592991528584912127.java)
	at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:182)
	at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:117)
	at org.jboss.jms.client.delegate.ClientSessionDelegate$cancelDeliveries_6592991528584912127.invokeNext(ClientSessionDelegate$cancelDeliveries_6592991528584912127.java)
	at org.jboss.jms.client.container.ExceptionInterceptor.invoke(ExceptionInterceptor.java:69)
	at org.jboss.jms.client.delegate.ClientSessionDelegate$cancelDeliveries_6592991528584912127.invokeNext(ClientSessionDelegate$cancelDeliveries_6592991528584912127.java)
	at org.jboss.jms.client.container.ClientLogInterceptor.invoke(ClientLogInterceptor.java:107)
	at org.jboss.jms.client.delegate.ClientSessionDelegate$cancelDeliveries_6592991528584912127.invokeNext(ClientSessionDelegate$cancelDeliveries_6592991528584912127.java)
	at org.jboss.jms.client.delegate.ClientSessionDelegate.cancelDeliveries(ClientSessionDelegate.java)
	at org.jboss.jms.client.remoting.MessageCallbackHandler.close(MessageCallbackHandler.java:339)
	at org.jboss.jms.client.container.ConsumerAspect.handleClosing(ConsumerAspect.java:115)
	at org.jboss.aop.advice.org.jboss.jms.client.container.ConsumerAspect26.invoke(ConsumerAspect26.java)
	at org.jboss.jms.client.delegate.ClientConsumerDelegate$closing_4945873952494833124.invokeNext(ClientConsumerDelegate$closing_4945873952494833124.java)
	at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:182)
	at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:117)
	at org.jboss.jms.client.delegate.ClientConsumerDelegate$closing_4945873952494833124.invokeNext(ClientConsumerDelegate$closing_4945873952494833124.java)
	at org.jboss.jms.client.container.ExceptionInterceptor.invoke(ExceptionInterceptor.java:69)
	at org.jboss.jms.client.delegate.ClientConsumerDelegate$closing_4945873952494833124.invokeNext(ClientConsumerDelegate$closing_4945873952494833124.java)
	at org.jboss.jms.client.container.ClientLogInterceptor.invoke(ClientLogInterceptor.java:107)
	at org.jboss.jms.client.delegate.ClientConsumerDelegate$closing_4945873952494833124.invokeNext(ClientConsumerDelegate$closing_4945873952494833124.java)
	at org.jboss.jms.client.delegate.ClientConsumerDelegate.closing(ClientConsumerDelegate.java)
	at org.jboss.jms.client.container.ClosedInterceptor.maintainRelatives(ClosedInterceptor.java:300)
	at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:177)
	at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:117)
	at org.jboss.jms.client.delegate.ClientSessionDelegate$closing_4945873952494833124.invokeNext(ClientSessionDelegate$closing_4945873952494833124.java)
	at org.jboss.jms.client.container.ExceptionInterceptor.invoke(ExceptionInterceptor.java:69)
	at org.jboss.jms.client.delegate.ClientSessionDelegate$closing_4945873952494833124.invokeNext(ClientSessionDelegate$closing_4945873952494833124.java)
	at org.jboss.jms.client.container.ClientLogInterceptor.invoke(ClientLogInterceptor.java:107)
	at org.jboss.jms.client.delegate.ClientSessionDelegate$closing_4945873952494833124.invokeNext(ClientSessionDelegate$closing_4945873952494833124.java)
	at org.jboss.jms.client.delegate.ClientSessionDelegate.closing(ClientSessionDelegate.java)
	at org.jboss.jms.client.container.ClosedInterceptor.maintainRelatives(ClosedInterceptor.java:300)
	at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:177)
	at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:117)
	at org.jboss.jms.client.delegate.ClientConnectionDelegate$closing_4945873952494833124.invokeNext(ClientConnectionDelegate$closing_4945873952494833124.java)
	at org.jboss.jms.client.container.ExceptionInterceptor.invoke(ExceptionInterceptor.java:69)
	at org.jboss.jms.client.delegate.ClientConnectionDelegate$closing_4945873952494833124.invokeNext(ClientConnectionDelegate$closing_4945873952494833124.java)
	at org.jboss.jms.client.container.ClientLogInterceptor.invoke(ClientLogInterceptor.java:107)
	at org.jboss.jms.client.delegate.ClientConnectionDelegate$closing_4945873952494833124.invokeNext(ClientConnectionDelegate$closing_4945873952494833124.java)
	at org.jboss.jms.client.delegate.ClientConnectionDelegate.closing(ClientConnectionDelegate.java)
	at org.jboss.jms.client.JBossConnection.close(JBossConnection.java:131)
	at com.systar.gateway.services.jms.JMSQueueService.endService(JMSQueueService.java:150)
	at com.systar.gateway.services.GatewayService.stop(GatewayService.java:269)
	at com.systar.gateway.services.GatewayService.stop(GatewayService.java:230)
	at com.systar.gateway.services.JavaGateway.stopService(JavaGateway.java:107)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)
	at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)
	at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
	at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
	at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
	at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
	at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)
	at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
	at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
	at com.systar.gateway.SystarAxisServlet.doPost(SystarAxisServlet.java:86)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
	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.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:534)"

and then I get this kind of WARN messages:


"2006-11-08 12:20:50,138 WARN  [org.jboss.jms.server.endpoint.ServerConsumerEndpoint] Reference[222350]:RELIABLE has exceed maximum delivery attempts and will be removed"


Here is an summary of what is done in the code:
1- When the client is started:
this.queue = (Queue)ctx.lookup("queue/myQueue");
ConnectionFactory connFac = (ConnectionFactory)ctx.lookup("ConnectionFactory");
this.jmsQueueConnection = ((QueueConnectionFactory)connFac).createQueueConnection();	
this.jmsQueueSession = this.jmsQueueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);


2- The client then loops and invokes the readMessages service, which content is described here:
this.jmsQueueConnection.start();
QueueReceiver receiver = this.jmsQueueSession.createReceiver(this.queue); 
//In the second version I declared the receiver object as instance variable 
//instead of local variable: I instanciate it when the readMessages is //invoked for the first time, then I just use the instance
Message msg = receiver.receiveNoWait();
//And then msg processing

3- When the client is stopped:
jmsConnection.close();

Did I make a mistake somewhere?


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3984086#3984086

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3984086



More information about the jboss-user mailing list