4 Replies Latest reply on May 6, 2004 10:10 AM by grub82

    At shutdown: Exception destroying ManagedConnection

    grub82 Newbie

      Hi,

      I'm having a weird problem here. I use a DBPoller MBean, that checks the hsqldb regularly for new records. In the connect method of that MBean I create the connection and the statement, and in the finally block of that method I close them. So I'm sure I'm closing the connection everytime.

      However, when shutting down JBoss it gives me this:

      08:44:36,218 INFO [Server] JBoss SHUTDOWN: Undeploying all packages
      08:44:36,218 INFO [EmbeddedTomcatService] undeploy, ctxPath=/web-console, warUrl=file:/C:/appl/jboss-3.2.3/server/default/tmp/deploy/tmp33680web-console.war/
      08:44:36,218 INFO [Engine] StandardHost[localhost]: Removing web application at context path /web-console
      08:44:36,281 INFO [EmbeddedTomcatService] undeploy, ctxPath=/jmx-console, warUrl=file:/C:/appl/jboss-3.2.3/server/default/deploy/jmx-console.war/
      08:44:36,296 INFO [Engine] StandardHost[localhost]: Removing web application at context path /jmx-console
      08:44:36,328 WARN [DeploymentInfo] Could not delete file:/C:/appl/jboss-3.2.3/server/default/tmp/deploy/tmp33679RequestAgent.jar restart will delete it
      08:44:36,328 INFO [EjbModule] Stopping jboss.j2ee:module=filedispatcher.jar,service=EjbModule
      08:44:36,328 INFO [MessageDrivenContainer] Stopping jboss.j2ee:jndiName=local/FileDispatcherMDB,service=EJB
      08:44:36,328 INFO [MessageDrivenContainer] Stopping
      08:44:36,328 INFO [JMSContainerInvoker] Stopping jboss.j2ee:binding=message-driven-bean,jndiName=local/FileDispatcherMDB,plugin=invoker,service=EJB
      08:44:36,343 INFO [DLQHandler] Stopping null
      08:44:36,343 INFO [MessageDrivenInstancePool] Stopping jboss.j2ee:jndiName=local/FileDispatcherMDB,plugin=pool,service=EJB
      08:44:36,359 INFO [EJBModule] destroy(), remove EJB-Module: jboss.management.local:J2EEApplication=null,J2EEServer=Local,j2eeType=EJBModule,name=filedispatcher.jar
      08:44:36,359 WARN [DeploymentInfo] Could not delete file:/C:/appl/jboss-3.2.3/server/default/tmp/deploy/tmp33678filedispatcher.jar restart will delete it
      08:44:36,359 WARN [DeploymentInfo] Could not delete file:/C:/appl/jboss-3.2.3/server/default/tmp/deploy/tmp33677fileadapter.jar restart will delete it
      08:44:36,359 INFO [MessageToFileWriter] Stopping MessageToFileWriter...
      08:44:36,359 INFO [DBPoller] Stopping DBPoller...
      08:44:36,375 INFO [testTopic] Stopping jboss.mq.destination:service=Topic,name=testTopic
      08:44:36,390 INFO [securedTopic] Stopping jboss.mq.destination:service=Topic,name=securedTopic
      08:44:36,390 INFO [testDurableTopic] Stopping jboss.mq.destination:service=Topic,name=testDurableTopic
      08:44:36,390 INFO [testQueue] Stopping jboss.mq.destination:service=Queue,name=testQueue
      08:44:36,390 INFO [A] Stopping jboss.mq.destination:service=Queue,name=A
      08:44:36,390 INFO [B] Stopping jboss.mq.destination:service=Queue,name=B
      08:44:36,390 INFO [C] Stopping jboss.mq.destination:service=Queue,name=C
      08:44:36,390 INFO [D] Stopping jboss.mq.destination:service=Queue,name=D
      08:44:36,390 INFO [ex] Stopping jboss.mq.destination:service=Queue,name=ex
      08:44:36,406 INFO [HTTPServerILService] Stopping jboss.mq:service=InvocationLayer,type=HTTP
      08:44:36,406 INFO [JVMServerILService] Stopping jboss.mq:service=InvocationLayer,type=JVM
      08:44:36,406 INFO [OILServerILService] Stopping jboss.mq:service=InvocationLayer,type=OIL
      08:44:36,406 INFO [OIL2ServerILService] Stopping jboss.mq:service=InvocationLayer,type=OIL2
      08:44:36,406 INFO [RMIServerILService] Stopping jboss.mq:service=InvocationLayer,type=RMI
      08:44:36,406 INFO [UILServerILService] Stopping jboss.mq:service=InvocationLayer,type=UIL2
      08:44:36,421 INFO [Invoker] Stopping jboss.mq:service=Invoker
      08:44:36,421 INFO [InterceptorLoader] Stopping jboss.mq:service=TracingInterceptor
      08:44:36,421 INFO [DLQ] Stopping jboss.mq.destination:service=Queue,name=DLQ
      08:44:36,421 INFO [SecurityManager] Stopping jboss.mq:service=SecurityManager
      08:44:36,421 INFO [DestinationManager] Stopping jboss.mq:service=DestinationManager
      08:44:36,421 INFO [PersistenceManager] Stopping jboss.mq:service=PersistenceManager
      08:44:36,421 INFO [TxConnectionManager] Stopping jboss.jca:service=LocalTxCM,name=DefaultDS
      08:44:36,421 INFO [TxConnectionManager] Stopping jboss.jca:service=TxCM,name=JmsXA
      08:44:36,437 INFO [TxConnectionManager] Stopping jboss.jca:service=LocalTxCM,name=triennium/HsqlRoutingFileDS
      08:44:36,437 INFO [CachedConnectionManager] Stopping jboss.jca:service=CachedConnectionManager
      08:44:36,453 INFO [ServerSessionPoolLoader] Stopping sonic.mq:service=ServerSessionPoolMBean,name=StdSonicJMSPool
      08:44:36,468 INFO [ServerSessionPoolLoader] pool factory StdSonicJMSPool unbound from java:/StdSonicJMSPool
      08:44:36,468 INFO [JMSProviderLoader] Stopping sonic.mq:service=JMSProviderLoader,name=SonicMQXAProvider
      08:44:36,468 INFO [JMSProviderLoader] unbound adapter DefaultSonicJMSXAProvider from java:/DefaultSonicJMSXAProvider
      08:44:36,468 INFO [JMSProviderLoader] Stopping sonic.mq:service=JMSProviderLoader,name=SonicMQProvider
      08:44:36,468 INFO [JMSProviderLoader] unbound adapter DefaultSonicJMSProvider from java:/DefaultSonicJMSProvider
      08:44:36,468 INFO [JBossLoader] Stopping sonic.mq:service=JNDILoader
      08:44:36,468 INFO [JBossLoader] unbound java:/JBossLoader from JBossLoader
      08:44:36,484 INFO [SystemPropertiesService] Stopping jboss:type=Service,name=SystemProperties
      08:44:36,500 INFO [PropertyEditorManagerService] Stopping jboss:type=Service,name=PropertyEditorManager
      08:44:36,500 INFO [MailService] Stopping jboss:service=Mail
      08:44:36,500 INFO [MailService] Mail service 'java:/Mail' removed from JNDI
      08:44:36,515 INFO [NamingAlias] Stopping jboss.mq:service=InvocationLayer,type=UILXA
      08:44:36,515 INFO [NamingAlias] Stopping jboss.mq:service=InvocationLayer,type=UIL
      08:44:36,546 INFO [DynamicStateManager] Stopping jboss.mq:service=StateManager
      08:44:36,578 INFO [MessageCache] Stopping jboss.mq:service=MessageCache
      08:44:36,593 INFO [ClientDeployer] Stopping jboss.j2ee:service=ClientDeployer
      08:44:36,593 INFO [MainDeployer] Removing deployer: org.jboss.deployment.ClientDeployer@103fcaa
      08:44:36,609 INFO [InvalidationManager] Stopping jboss.cache:service=InvalidationManager
      08:44:36,609 INFO [InvalidationManager] Stoping Invalidation Manager jboss.cache:service=InvalidationManager
      08:44:36,609 INFO [HypersonicDatabase] Stopping jboss:service=Hypersonic
      08:44:36,734 INFO [HypersonicDatabase] Database closed clean
      08:44:36,734 INFO [JBossManagedConnectionPool] Stopping jboss.jca:service=ManagedConnectionPool,name=triennium/HsqlRoutingFileDS
      08:44:36,734 INFO [STDOUT] Thu May 06 08:44:36 CEST 2004 SHUTDOWN : System.exit() is called next
      08:44:36,750 WARN [JBossManagedConnectionPool] Exception destroying ManagedConnection
      org.jboss.resource.JBossResourceException: SQLException; - nested throwable: (java.sql.SQLException: The database is shutdown in statement [DISCONNECT])
       at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.checkException(BaseWrapperManagedConnection.java:546)
       at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.destroy(BaseWrapperManagedConnection.java:252)
       at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.doDestroy(InternalManagedConnectionPool.java:502)
       at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.flush(InternalManagedConnectionPool.java:350)
       at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.shutdown(InternalManagedConnectionPool.java:396)
       at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.shutdown(JBossManagedConnectionPool.java:574)
       at org.jboss.resource.connectionmanager.JBossManagedConnectionPool.stopService(JBossManagedConnectionPool.java:399)
       at org.jboss.system.ServiceMBeanSupport.stop(ServiceMBeanSupport.java:240)
       at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
       at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
       at $Proxy14.stop(Unknown Source)
       at org.jboss.system.ServiceController.stop(ServiceController.java:471)
       at org.jboss.system.ServiceController.stop(ServiceController.java:462)
       at sun.reflect.GeneratedMethodAccessor46.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
       at $Proxy4.stop(Unknown Source)
       at org.jboss.deployment.SARDeployer.stop(SARDeployer.java:373)
       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.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
       at org.jboss.mx.util.JMXInvocationHandler.invoke(JMXInvocationHandler.java:177)
       at $Proxy20.stop(Unknown Source)
       at org.jboss.deployment.XSLSubDeployer.stop(XSLSubDeployer.java:230)
       at org.jboss.deployment.MainDeployer.stop(MainDeployer.java:489)
       at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:472)
       at org.jboss.deployment.MainDeployer.shutdown(MainDeployer.java:359)
       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.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
       at org.jboss.system.server.ServerImpl$ShutdownHook.shutdownDeployments(ServerImpl.java:849)
       at org.jboss.system.server.ServerImpl$ShutdownHook.shutdown(ServerImpl.java:824)
       at org.jboss.system.server.ServerImpl$ShutdownHook.run(ServerImpl.java:812)
      Caused by: java.sql.SQLException: The database is shutdown in statement [DISCONNECT]
       at org.hsqldb.Trace.getError(Unknown Source)
       at org.hsqldb.Result.<init>(Unknown Source)
       at org.hsqldb.jdbcConnection.executeHSQL(Unknown Source)
       at org.hsqldb.jdbcConnection.execute(Unknown Source)
       at org.hsqldb.jdbcConnection.close(Unknown Source)
       at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.destroy(BaseWrapperManagedConnection.java:248)
       ... 44 more
      08:44:36,828 WARN [JBossManagedConnectionPool] Exception destroying ManagedConnection
      org.jboss.resource.JBossResourceException: SQLException; - nested throwable: (java.sql.SQLException: Connection is broken: Software caused connection abort: recv failed)
       at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.checkException(BaseWrapperManagedConnection.java:546)
       at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.destroy(BaseWrapperManagedConnection.java:252)
       at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.doDestroy(InternalManagedConnectionPool.java:502)
       at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.flush(InternalManagedConnectionPool.java:350)
      



      It's not a real big problem, but I want to have it clean since I don't wanna get support calls from the guys we're selling the solution to. And I've been looking and searching for the answer for a couple of hours now, I just really want to know how to solve it... ;-)

      Thanks in advance!
      Gerben Vermoen