Announcement Announcement Module
Collapse
No announcement yet.
JBoss messaging - Close connection Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • JBoss messaging - Close connection

    Hi,

    we are using two Jboss servers (on two different Linux machines). Both JBoss servers are 4.2.2 and on one server we have JBoss Messaging 1.4.0SP3 installed.

    When we send simple message from one server (without Messaging) we got following exception (not, that we use spring's JMSTemplate)

    Code:
    2008-10-29 14:14:33,484 DEBUG [org.springframework.jms.connection.SingleConnectionFactory] Could not
     close shared JMS Connection
    java.lang.NullPointerException
    	at org.jboss.jms.client.container.ClosedInterceptor.maintainRelatives(ClosedInterceptor.java:285)
    	at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:165)
    	at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
    	at org.jboss.jms.client.delegate.ClientConnectionDelegate$closing_2473194355759371067.invokeNext(Cl
    ientConnectionDelegate$closing_2473194355759371067.java)
    	at org.jboss.jms.client.delegate.ClientConnectionDelegate.closing(ClientConnectionDelegate.java)
    	at org.jboss.jms.client.JBossConnection.close(JBossConnection.java:131)
    	at org.springframework.jms.connection.SingleConnectionFactory.closeConnection(SingleConnectionFacto
    ry.java:364)
    	at org.springframework.jms.connection.SingleConnectionFactory.resetConnection(SingleConnectionFacto
    ry.java:302)
    	at org.springframework.jms.connection.SingleConnectionFactory.destroy(SingleConnectionFactory.java:
    293)
    	at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.ja
    va:151)
    	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingle
    tonBeanRegistry.java:456)
    	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultS
    ingletonBeanRegistry.java:434)
    	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(Default
    SingletonBeanRegistry.java:407)
    	at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationC
    ontext.java:854)
    	at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContex
    t.java:832)
    	at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.
    java:795)
    	at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:361)
    
    	at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.jav
    a:70)
    	at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:3895)
    	at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4527)
    	at org.apache.catalina.core.ContainerBase.destroy(ContainerBase.java:1163)
    	at org.apache.catalina.core.StandardContext.destroy(StandardContext.java:4617)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	at java.lang.reflect.Method.invoke(Unknown Source)
    	at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
    	at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
    	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    	at org.jboss.web.tomcat.service.TomcatDeployer.performUndeployInternal(TomcatDeployer.java:454)
    	at org.jboss.web.tomcat.service.TomcatDeployer.performUndeploy(TomcatDeployer.java:425)
    	at org.jboss.web.AbstractWebDeployer.stop(AbstractWebDeployer.java:422)
    	at org.jboss.web.WebModule.stopModule(WebModule.java:100)
    	at org.jboss.web.WebModule.stopService(WebModule.java:66)
    	at org.jboss.system.ServiceMBeanSupport.jbossInternalStop(ServiceMBeanSupport.java:315)
    	at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:247)
    	at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	at java.lang.reflect.Method.invoke(Unknown Source)
    	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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	at java.lang.reflect.Method.invoke(Unknown Source)
    	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 $Proxy44.stop(Unknown Source)
    	at org.jboss.web.AbstractWebContainer.stop(AbstractWebContainer.java:498)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	at java.lang.reflect.Method.invoke(Unknown Source)
    	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.ja
    va:142)
    	at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
    	at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:2
    38)
    	at org.jboss.wsf.container.jboss42.DeployerInterceptor.stop(DeployerInterceptor.java:98)
    	at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.stop(SubDeployerInterceptor
    Support.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 $Proxy45.stop(Unknown Source)
    	at org.jboss.deployment.MainDeployer.stop(MainDeployer.java:667)
    	at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:638)
    	at org.jboss.deployment.MainDeployer.shutdown(MainDeployer.java:516)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	at java.lang.reflect.Method.invoke(Unknown Source)
    	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.ja
    va: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.system.server.ServerImpl$ShutdownHook.shutdownDeployments(ServerImpl.java:1058)
    	at org.jboss.system.server.ServerImpl$ShutdownHook.shutdown(ServerImpl.java:1033)
    	at org.jboss.system.server.ServerImpl$ShutdownHook.run(ServerImpl.java:996)
    We also try this woth and without SingleConnectionFactory, but results are the same.

    Best.

  • #2
    Stack trace shows that jboss is being stopped and calls close() on Spring context. The context tries to gracefully close used resources like jms but jms provider throws an NPE. Most likely it's already down at that moment.

    I suppose that you should find the way to specify the shutdown order for your components and make spring context closing before jms provider.

    Comment

    Working...
    X