3 Replies Latest reply on May 26, 2003 6:50 AM by Jari Kujansuu

    3.2.0 and 3.2.1 shutdown problems

    Jari Kujansuu Newbie

      Hi,

      Background. We have made repository style system that connects to other parts of framework through webservices, or actually mostly others connect. So we have EJBs and permanent storage is done in HSQLDB.

      Everything worked correctly in 3.2.0RC3.

      Then switched to 3.2.0 and everything still worked correctly, except when shutdown server. When system was closing datasource used to store data I get following exception (actually this is from 3.2.1 but I think it was identical, at least top of it was)


      2003-05-08 11:18:24,152 DEBUG [org.jboss.system.ServiceController] stopping service: jboss.jca:service=LocalTxCM,name=Data
      2003-05-08 11:18:24,152 INFO [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Stopping
      2003-05-08 11:18:24,182 DEBUG [org.jboss.util.NestedThrowable] org.jboss.util.NestedThrowable.parentTraceEnabled=true
      2003-05-08 11:18:24,182 DEBUG [org.jboss.util.NestedThrowable] org.jboss.util.NestedThrowable.nestedTraceEnabled=false
      2003-05-08 11:18:24,182 DEBUG [org.jboss.util.NestedThrowable] org.jboss.util.NestedThrowable.detectDuplicateNesting=true
      2003-05-08 11:18:24,172 INFO [org.jboss.resource.connectionmanager.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:445)
      at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.destroy(BaseWrapperManagedConnection.java:229)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.doDestroy(InternalManagedConnectionPool.java:374)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.flush(InternalManagedConnectionPool.java:272)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.shutdown(InternalManagedConnectionPool.java:307)
      at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool.shutdown(JBossManagedConnectionPool.java:670)
      at org.jboss.resource.connectionmanager.JBossManagedConnectionPool.stopService(JBossManagedConnectionPool.java:373)
      at org.jboss.system.ServiceMBeanSupport.stop(ServiceMBeanSupport.java:236)
      at sun.reflect.GeneratedMethodAccessor105.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:549)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:966)
      at $Proxy11.stop(Unknown Source)
      at org.jboss.system.ServiceController.stop(ServiceController.java:464)
      at org.jboss.system.ServiceController.stop(ServiceController.java:456)
      at sun.reflect.GeneratedMethodAccessor89.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:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy5.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:549)
      at org.jboss.mx.util.JMXInvocationHandler.invoke(JMXInvocationHandler.java:177)
      at $Proxy16.stop(Unknown Source)
      at org.jboss.deployment.XSLSubDeployer.stop(XSLSubDeployer.java:236)
      at org.jboss.deployment.MainDeployer.stop(MainDeployer.java:497)
      at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:480)
      at org.jboss.deployment.MainDeployer.shutdown(MainDeployer.java:368)
      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:549)
      at org.jboss.system.server.ServerImpl$ShutdownHook.shutdownDeployments(ServerImpl.java:808)
      at org.jboss.system.server.ServerImpl$ShutdownHook.shutdown(ServerImpl.java:783)
      at org.jboss.system.server.ServerImpl$ShutdownHook.run(ServerImpl.java:771)
      Caused by: java.sql.SQLException: The database is shutdown in statement [DISCONNECT]
      at org.hsqldb.Trace.getError(Unknown Source)
      at org.hsqldb.Result.(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:225)
      ... 44 more
      2003-05-08 11:18:24,182 INFO [STDOUT] Thu May 08 11:18:24 EEST 2003 SHUTDOWN : System.exit() was not called



      Then when noticed this I thought I would try 3.2.1 if this had been fixed in it. Result, same error plus one new.

      New error in 3.2.1 shutdown was that when destroying StatelessSessionInstancePool JBoss tries to delete some beans that have already been undeployed (complaining that env not bound etc.)


      Anyone had similiar experiences or otherwise know what might be wrong and what I could do to fix them ..besides sticking with 3.2.0RC3 version and informing other people who might want to run our system.

        • 1. Re: 3.2.0 and 3.2.1 shutdown problems
          David Jencks Master

          I think these messages you show are not actually causing a problem for your app, they just look ugly?

          Can you determine if the hsqldb mbean is shut down before or after the managed connection pool in question?

          Can you verify that there is an anonymous depends element in the *-ds.xml for this datasource pointing to the hsqldb mbean? This depends element should assure that the datasource/pool is shut down before the database.

          • 2. Re: 3.2.0 and 3.2.1 shutdown problems
            Jari Kujansuu Newbie

            I was not sure if they were causing problem to our system, but it wasn't nice to notice there was problem with database that stores all information. Haven't had time to do enough testing make sure.

            But I will check those *-ds.xml files.

            • 3. Re: 3.2.0 and 3.2.1 shutdown problems
              Jari Kujansuu Newbie

              Finally had time to check this again. I had incorrect depends definition in xml file. So that is fixed :)

              But I also have this other problem with beans in 3.2.1. When server is closing down it seems that instance pool for my stateless reporting bean is removed before instances of beans that use those beans are removed.

              In my business beans ejbRemove method get exception when it tries to remove stateless bean it has. Looks like it is trying to create new bean that could handle remove() call ...and can't because all bindings are already removed, gets "env not bound".

              What could be causing that error? I think it would be obvious that all bean instances are first removed before system starts to remove any instance pools but now it seems to be other way around and at least mine system doesn't work :(