Jackrabbit Content Repository
  1. Jackrabbit Content Repository
  2. JCR-1354

Repository shutdown reposts ERROR: failed to close connection

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 1.4
    • Fix Version/s: None
    • Component/s: jackrabbit-core
    • Labels:
      None
    • Environment:
      Linux x86/Sun jdk 1.6.0_3

      Description

      Norman repository shutdow reports error twice in logs:

      ERROR: failed to close connection, reason: No current connection., state/code: 08003/40000
      ERROR: failed to close connection, reason: No current connection., state/code: 08003/40000

      Does not matter if there are not-closed sessions or not.
      Use od Derby of FS causes additional SQL exceptions.

      1. derby.log
        1.85 MB
        Andrew Perepelytsya

        Issue Links

          Activity

          Hide
          Jukka Zitting added a comment -

          Derby fails with "No current connection" if some previous operation has failed for some reason.

          Can you set the following in a derby.properties file and see if any errors are logged:

          derby.stream.error.logSeverityLevel=0
          derby.language.logStatementText=true

          Show
          Jukka Zitting added a comment - Derby fails with "No current connection" if some previous operation has failed for some reason. Can you set the following in a derby.properties file and see if any errors are logged: derby.stream.error.logSeverityLevel=0 derby.language.logStatementText=true
          Hide
          Andrew Perepelytsya added a comment -

          Hi, after enabling those got the attached derby.log. Not that there was an immediate cause available, though...

          In my case got this error by simply shutting the just started app with an embedded jackrabbit, no changes made after start. The error, however, only exhibits itself if the bundle persistence managers are used, the standard 'db' ones don't have the error. But, the whole idea of using bundle PMs was to leverage the new DataStore facility (not really useful with plain db PMs).

          Here's the app shutdown log:

          [08-05 17:20:06] INFO / [Shutdown]: Closing Spring root WebApplicationContext
          [08-05 17:20:07] ERROR ConnectionRecoveryManager [Shutdown]: failed to close connection, reason: No current connection., state/code: 08003/40000
          [08-05 17:20:07] WARN DbFileSystem [Shutdown]: execute failed, about to reconnect...
          [08-05 17:20:17] ERROR RepositoryImpl [Shutdown]: Error while closing Version Manager.
          java.sql.SQLException: No current connection.
          at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
          at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
          at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
          at org.apache.derby.impl.jdbc.Util.noCurrentConnection(Unknown Source)
          at org.apache.derby.impl.jdbc.EmbedConnection.checkIfClosed(Unknown Source)
          at org.apache.derby.impl.jdbc.EmbedConnection.getMetaData(Unknown Source)
          at org.apache.jackrabbit.core.persistence.bundle.DerbyPersistenceManager.close(DerbyPersistenceManager.java:318)
          at org.apache.jackrabbit.core.version.VersionManagerImpl.close(VersionManagerImpl.java:201)
          at org.apache.jackrabbit.core.RepositoryImpl.doShutdown(RepositoryImpl.java:1000)
          at org.apache.jackrabbit.core.RepositoryImpl.shutdown(RepositoryImpl.java:948)
          at org.springmodules.jcr.jackrabbit.RepositoryFactoryBean.destroy(RepositoryFactoryBean.java:91)
          at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:154)
          at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:397)
          at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:375)
          at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:348)
          at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:861)
          at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:839)
          at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:802)
          at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:367)
          at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:70)
          at org.mortbay.jetty.handler.ContextHandler.doStop(ContextHandler.java:573)
          at org.mortbay.jetty.webapp.WebAppContext.doStop(WebAppContext.java:484)
          at org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:65)
          at org.mortbay.jetty.handler.HandlerWrapper.doStop(HandlerWrapper.java:129)
          at org.mortbay.jetty.Server.doStop(Server.java:281)
          at org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:65)
          at org.mortbay.jetty.Server$ShutdownHookThread.run(Server.java:559)
          [08-05 17:20:17] WARN DbFileSystem [Shutdown]: execute failed, about to reconnect...
          [08-05 17:20:27] INFO log [Shutdown]: Shutdown hook complete

          Process finished with exit code 1

          Show
          Andrew Perepelytsya added a comment - Hi, after enabling those got the attached derby.log. Not that there was an immediate cause available, though... In my case got this error by simply shutting the just started app with an embedded jackrabbit, no changes made after start. The error, however, only exhibits itself if the bundle persistence managers are used, the standard 'db' ones don't have the error. But, the whole idea of using bundle PMs was to leverage the new DataStore facility (not really useful with plain db PMs). Here's the app shutdown log: [08-05 17:20:06] INFO / [Shutdown] : Closing Spring root WebApplicationContext [08-05 17:20:07] ERROR ConnectionRecoveryManager [Shutdown] : failed to close connection, reason: No current connection., state/code: 08003/40000 [08-05 17:20:07] WARN DbFileSystem [Shutdown] : execute failed, about to reconnect... [08-05 17:20:17] ERROR RepositoryImpl [Shutdown] : Error while closing Version Manager. java.sql.SQLException: No current connection. at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.noCurrentConnection(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.checkIfClosed(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.getMetaData(Unknown Source) at org.apache.jackrabbit.core.persistence.bundle.DerbyPersistenceManager.close(DerbyPersistenceManager.java:318) at org.apache.jackrabbit.core.version.VersionManagerImpl.close(VersionManagerImpl.java:201) at org.apache.jackrabbit.core.RepositoryImpl.doShutdown(RepositoryImpl.java:1000) at org.apache.jackrabbit.core.RepositoryImpl.shutdown(RepositoryImpl.java:948) at org.springmodules.jcr.jackrabbit.RepositoryFactoryBean.destroy(RepositoryFactoryBean.java:91) at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:154) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:397) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:375) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:348) at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:861) at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:839) at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:802) at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:367) at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:70) at org.mortbay.jetty.handler.ContextHandler.doStop(ContextHandler.java:573) at org.mortbay.jetty.webapp.WebAppContext.doStop(WebAppContext.java:484) at org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:65) at org.mortbay.jetty.handler.HandlerWrapper.doStop(HandlerWrapper.java:129) at org.mortbay.jetty.Server.doStop(Server.java:281) at org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:65) at org.mortbay.jetty.Server$ShutdownHookThread.run(Server.java:559) [08-05 17:20:17] WARN DbFileSystem [Shutdown] : execute failed, about to reconnect... [08-05 17:20:27] INFO log [Shutdown] : Shutdown hook complete Process finished with exit code 1
          Hide
          Andrew Perepelytsya added a comment -

          The above stacktrace is with Jackrabbit 1.4.2

          Show
          Andrew Perepelytsya added a comment - The above stacktrace is with Jackrabbit 1.4.2
          Hide
          Marcel Reutegger added a comment -

          I think this is a duplicate of JCR-1499.

          Please reopen this issue if you can reproduce it with the current jackrabbit-core snapshot.

          Show
          Marcel Reutegger added a comment - I think this is a duplicate of JCR-1499 . Please reopen this issue if you can reproduce it with the current jackrabbit-core snapshot.
          Hide
          Marcel Reutegger added a comment -

          Actually, this should be fixed in 1.4.3 already.

          Show
          Marcel Reutegger added a comment - Actually, this should be fixed in 1.4.3 already.

            People

            • Assignee:
              Unassigned
              Reporter:
              Alex Lukin
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 10m
                10m
                Remaining:
                Remaining Estimate - 10m
                10m
                Logged:
                Time Spent - Not Specified
                Not Specified

                  Development