[jboss-user] [Messaging, JMS & JBossMQ] - Error during close() of a topic subscriber

ajay662 do-not-reply at jboss.com
Mon Nov 27 14:07:59 EST 2006


I have an MBean which creates a subscriber in its startService() method and closes it in its stopService() method. Everything is working fine, except when I undeploy my application and stopService() gets called, I get the JMSException "The subscription had not been previously registered". Its not a major problem since I don't expect my application to be un-deployed, but I am still wondering why the exception, what am I doing wrong?


startService() 
			
  TopicConnectionFactory t_factory = ...
  |   t_connection = t_factory.createTopicConnection();
  |   t_session = t_connection.createTopicSession(true, 
  | 					TopicSession.AUTO_ACKNOWLEDGE);
  |   Topic topic = locator.getTopic(myTopicJndiName);
  |   t_subscriber = t_session.createSubscriber(topic);


stopService() 

  t_subscriber.close();
  |   t_session.close();
  |   t_connection.close


Exception I get is


  | javax.jms.JMSException: The subscription had not been previously registered
  | 	at org.jboss.mq.server.ClientConsumer.removeSubscription(ClientConsumer.java:248)
  | 	at org.jboss.mq.server.JMSDestinationManager.unsubscribe(JMSDestinationManager.java:579)
  | 	at org.jboss.mq.server.JMSServerInterceptorSupport.unsubscribe(JMSServerInterceptorSupport.java:151)
  | 	at org.jboss.mq.server.TracingInterceptor.unsubscribe(TracingInterceptor.java:515)
  | 	at org.jboss.mq.server.JMSServerInvoker.unsubscribe(JMSServerInvoker.java:157)
  | 	at org.jboss.mq.il.jvm.JVMServerIL.unsubscribe(JVMServerIL.java:150)
  | 	at org.jboss.mq.Connection.removeConsumer(Connection.java:893)
  | 	at org.jboss.mq.SpySession.removeConsumer(SpySession.java:968)
  | 	at org.jboss.mq.SpyMessageConsumer.close(SpyMessageConsumer.java:563)
  | 	at org.jboss.resource.adapter.jms.JmsMessageConsumer.closeConsumer(JmsMessageConsumer.java:145)
  | 	at org.jboss.resource.adapter.jms.JmsMessageConsumer.close(JmsMessageConsumer.java:76)
  | 	at com.mycompany.enms.status.ClusterStatus.stopService(ClusterStatus.java:195)
  | 	at org.jboss.system.ServiceMBeanSupport.jbossInternalStop(ServiceMBeanSupport.java:315)
  | 	at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:247)
  | 	at sun.reflect.GeneratedMethodAccessor115.invoke(Unknown Source)
  | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | 	at java.lang.reflect.Method.invoke(Method.java:585)
  | 	at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  | 	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  | 	at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  | 	at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  | 	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  | 	at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
  | 	at $Proxy0.stop(Unknown Source)
  | 	at org.jboss.system.ServiceController.stop(ServiceController.java:508)
  | 	at org.jboss.system.ServiceController.stop(ServiceController.java:499)
  | 	at sun.reflect.GeneratedMethodAccessor96.invoke(Unknown Source)
  | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | 	at java.lang.reflect.Method.invoke(Method.java:585)
  | 	at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  | 	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  | 	at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  | 	at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  | 	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  | 	at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  | 	at $Proxy25.stop(Unknown Source)
  | 	at org.jboss.ejb.EJBDeployer.stop(EJBDeployer.java:688)
  | 	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:585)
  | 	at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  | 	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  | 	at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
  | 	at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  | 	at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
  | 	at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
  | 	at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
  | 	at org.jboss.ws.integration.jboss.DeployerInterceptor.stop(DeployerInterceptor.java:122)
  | 	at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.stop(SubDeployerInterceptorSupport.java:196)
  | 	at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:99)
  | 	at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  | 	at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  | 	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  | 	at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  | 	at $Proxy26.stop(Unknown Source)
  | 	at org.jboss.deployment.MainDeployer.stop(MainDeployer.java:667)
  | 	at org.jboss.deployment.MainDeployer.stop(MainDeployer.java:659)
  | 	at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:638)
  | 	at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:632)
  | 	at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:615)
  | 	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:585)
  | 	at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  | 	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  | 	at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
  | 	at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  | 	at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
  | 	at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  | 	at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  | 	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  | 	at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  | 	at $Proxy8.undeploy(Unknown Source)
  | 	at org.jboss.deployment.scanner.URLDeploymentScanner.undeploy(URLDeploymentScanner.java:450)
  | 	at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:570)
  | 	at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
  | 	at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
  | 	at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)

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

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



More information about the jboss-user mailing list