6 Replies Latest reply on Mar 22, 2006 10:27 AM by Holger Schoenen

    Closing a connection for you.   Please close them yourself

    subhani Newbie

      [CachedConnectionManager] Closing a connection for you.
      Please close them yourself: org.jboss.resource.adapter.jdbc.WrappedConnection@16cf4f9
      java.lang.Exception: STACKTRACE
      at org.jboss.resource.connectionmanager.CachedConnectionManager.registerConnection(CachedConnectionManager.java:282) at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:506) at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:814) at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102) at ws.ilabs.ivision.subscriber.domain.SubscriberDAO.getTopStories(SubscriberDAO.java:274) at ws.ilabs.ivision.subscriber.services.SubscriberFacadeBean.getTopStories(SubscriberFacadeBean.java:195) at sun.reflect.GeneratedMethodAccessor116.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:683) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185) at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72) at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84) at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:267) at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:128) at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:118) at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191) at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122) at org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:331) at org.jboss.ejb.Container.invoke(Container.java:700) at sun.reflect.GeneratedMethodAccessor107.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.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:367) at sun.reflect.GeneratedMethodAccessor108.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261) at sun.rmi.transport.Transport$1.run(Transport.java:148) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:144) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701) at java.lang.Thread.run(Thread.java:536) 09:47:45,328 WARN [WrappedConnection] Closing a statement you left open, please do your own housekeeping java.lang.Exception: STACK TRACE at org.jboss.resource.adapter.jdbc.WrappedConnection.registerStatement(WrappedConnection.java:805) at org.jboss.resource.adapter.jdbc.WrappedStatement.(WrappedStatement.java:43) at org.jboss.resource.adapter.jdbc.WrappedConnection.createStatement(WrappedConnection.java:142) at ws.ilabs.ivision.subscriber.domain.SubscriberDAO.getTopStories(SubscriberDAO.java:276) at ws.ilabs.ivision.subscriber.services.SubscriberFacadeBean.getTopStories(SubscriberFacadeBean.java:195) at sun.reflect.GeneratedMethodAccessor116.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:683) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185) at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72) at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84) at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:267) at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:128) at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:118) at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191) at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122) at org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:331) at org.jboss.ejb.Container.invoke(Container.java:700) at sun.reflect.GeneratedMethodAccessor107.invoke(Unknown Source)

        • 2. Re: Closing a connection for you.   Please close them yourse
          Benny De Vuyst Newbie

          Having a similar problem:

          2004-03-19 09:31:05,229 ERROR [SibisLogger] DocumentManagerBean:getApplicDocuments; could not find with SQL reason = Fail to convert to internal representation
          2004-03-19 09:31:05,245 INFO [org.jboss.resource.connectionmanager.CachedConnectionManager] Closing a connection for you. Please close them yourself: org.jboss.resource.adapter.jdbc.WrappedConnection@104f8b8
          java.lang.Exception: STACKTRACE
          at org.jboss.resource.connectionmanager.CachedConnectionManager.registerConnection(CachedConnectionManager.java:282)
          at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:506)
          at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:814)
          at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102)


          I can't seem to find the cause.
          How to clese connectionourself??

          • 3. Re: Closing a connection for you.   Please close them yourse
            Benny De Vuyst Newbie

            Having a similar problem:

            2004-03-19 09:31:05,229 ERROR [SibisLogger] DocumentManagerBean:getApplicDocuments; could not find with SQL reason = Fail to convert to internal representation
            2004-03-19 09:31:05,245 INFO [org.jboss.resource.connectionmanager.CachedConnectionManager] Closing a connection for you. Please close them yourself: org.jboss.resource.adapter.jdbc.WrappedConnection@104f8b8
            java.lang.Exception: STACKTRACE
            at org.jboss.resource.connectionmanager.CachedConnectionManager.registerConnection(CachedConnectionManager.java:282)
            at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:506)
            at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:814)
            at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102)


            I can't seem to find the cause.
            How to close connectionourself??

            • 4. Re: Closing a connection for you.   Please close them yourse
              Darran Lofthouse Master

              Sorry I was being sarcastic, just posting a stack trace and expecting a response isn't really going to happen.

              What are you doing to get the exception?
              - Using a connection from a session bean?
              - Using BMP?
              - Using CMP?
              - Anything else that may use a connection to a database?

              What JBoss version?
              What JVM version?
              What OS version?

              Does the problem happen in some scenarios and not others?

              Are any other errors reported apart from this one? It is quite possible that this is a result of something else failing.

              • 5. Re: Closing a connection for you.   Please close them yourse
                juan anasco Newbie

                i'm having the same problem..
                i´m using a ejb to do a query to oracle db using the template oracle.ds.xml. i'm using Struts too...when compiling is no problem...and after start jboss...
                [JkMain] Jk running ID=0 time=0/281 config=null
                21:43:09,796 INFO [Server] JBoss (MX MicroKernel) [3.2.8 (build: CVSTag=JBoss_3_2_8 date=200602071511)] Started in 46s:765ms
                21:43:28,375 INFO [CachedConnectionManager] Closing a connection for you. Please close them yourself: org.jboss.resource.adapter.jdbc.WrappedConnection@6ccf3e
                java.lang.Exception: STACKTRACE
                at org.jboss.resource.connectionmanager.CachedConnectionManager.registerConnection(CachedConnectionManager.java:335)
                at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:556)
                at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:926)

                • 6. Re: Closing a connection for you.   Please close them yourse
                  Holger Schoenen Newbie

                  In case you use BMP e.g. your code might look like:
                  try {
                  connection = jdbcFactory.getConnection();
                  connection.setReadOnly(true); // this might fail
                  preparedSatement = connection.prepareStatement(...);
                  ....
                  resultSet = preparedStatement.executeQuery();
                  ...
                  } catch (...) {
                  } finally {
                  preparedStatement.close();
                  connection.close();
                  } ...
                  preparedStatement might be null and the preparedStatement.close() should throw an exception. connection.close() would be never reached and the container would tell you, plse close it yourself!
                  This as an example to run into a trap.

                  holger