Archiva
  1. Archiva
  2. MRM-724

Unable to restart Archiva after restarting Tomcat : "SQL Exception: Failed to start database"

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Blocker Blocker
    • Resolution: Duplicate
    • Affects Version/s: 1.0.1
    • Fix Version/s: None
    • Component/s: Web Interface
    • Labels:
      None
    • Environment:
      Linux / Tomcat-5.5.26
    • Number of attachments :
      0

      Description

      After restarting Tomcat, I get the following exception in the log file :

      3282 [Main Thread] ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/archiva] - Exception lors de l'envoi de l'évènement contexte initialisé (context initialized) à l'instance de classe d'écoute (listener) org.codehaus.plexus.xwork.PlexusLifecycleListener
      javax.jdo.JDODataStoreException: Failed initialising database. Please check that your database JDBC driver is accessible, and the database URL and username/password are correct. Exception : Cannot create PoolableConnectionFactory (Failed to start database '/exec/products/jonas/integration/archiva/database/users', see the next exception for details.)
      org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Failed to start database '/exec/products/jonas/integration/archiva/database/users', see the next exception for details.)
      at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)
      at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
      at org.jpox.util.FailoverUtils.getConnection(FailoverUtils.java:51)
      at org.jpox.store.rdbms.RDBMSManager.<init>(RDBMSManager.java:244)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
      at org.jpox.util.ClassUtils.newInstance(ClassUtils.java:73)
      at org.jpox.store.StoreManagerFactory.getStoreManager(StoreManagerFactory.java:73)
      at org.jpox.AbstractPersistenceManager.getStoreManager(AbstractPersistenceManager.java:295)
      at org.jpox.AbstractPersistenceManager.<init>(AbstractPersistenceManager.java:217)
      at org.jpox.PersistenceManagerImpl.<init>(PersistenceManagerImpl.java:42)
      at org.jpox.PersistenceManagerFactoryImpl.getPersistenceManager(PersistenceManagerFactoryImpl.java:178)
      at org.jpox.PersistenceManagerFactoryImpl.getPersistenceManager(PersistenceManagerFactoryImpl.java:153)
      at org.codehaus.plexus.redback.rbac.jdo.JdoTool.getPersistenceManager(JdoTool.java:114)
      at org.codehaus.plexus.redback.rbac.jdo.JdoTool.getObjectById(JdoTool.java:292)
      at org.codehaus.plexus.redback.rbac.jdo.JdoTool.objectExistsById(JdoTool.java:340)
      at org.codehaus.plexus.redback.rbac.jdo.JdoRbacManager.resourceExists(JdoRbacManager.java:467)
      at org.codehaus.plexus.redback.rbac.cached.CachedRbacManager.resourceExists(CachedRbacManager.java:622)
      at org.codehaus.plexus.redback.role.processor.DefaultRoleModelProcessor.processResources(DefaultRoleModelProcessor.java:77)
      at org.codehaus.plexus.redback.role.processor.DefaultRoleModelProcessor.process(DefaultRoleModelProcessor.java:63)
      at org.codehaus.plexus.redback.role.DefaultRoleManager.loadRoleModel(DefaultRoleManager.java:210)
      at org.codehaus.plexus.redback.role.DefaultRoleManager.loadRoleModel(DefaultRoleManager.java:132)
      at org.codehaus.plexus.redback.role.DefaultRoleManager.initialize(DefaultRoleManager.java:457)
      at org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializePhase.execute(InitializePhase.java:33)
      at org.codehaus.plexus.lifecycle.AbstractLifecycleHandler.start(AbstractLifecycleHandler.java:128)
      at org.codehaus.plexus.component.manager.AbstractComponentManager.startComponentLifecycle(AbstractComponentManager.java:142)
      at org.codehaus.plexus.component.manager.AbstractComponentManager.createComponentInstance(AbstractComponentManager.java:132)
      at org.codehaus.plexus.component.manager.ClassicSingletonComponentManager.getComponent(ClassicSingletonComponentManager.java:90)
      at org.codehaus.plexus.DefaultComponentLookupManager.lookup(DefaultComponentLookupManager.java:147)
      at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:333)
      at org.codehaus.plexus.component.composition.AbstractComponentComposer.findRequirement(AbstractComponentComposer.java:241)
      at org.codehaus.plexus.component.composition.FieldComponentComposer.assignRequirementToField(FieldComponentComposer.java:66)
      at org.codehaus.plexus.component.composition.FieldComponentComposer.assignRequirement(FieldComponentComposer.java:57)
      at org.codehaus.plexus.component.composition.AbstractComponentComposer.assembleComponent(AbstractComponentComposer.java:143)
      at org.codehaus.plexus.component.composition.DefaultComponentComposerManager.assembleComponent(DefaultComponentComposerManager.java:72)
      at org.codehaus.plexus.personality.plexus.lifecycle.phase.CompositionPhase.execute(CompositionPhase.java:46)
      at org.codehaus.plexus.lifecycle.AbstractLifecycleHandler.start(AbstractLifecycleHandler.java:128)
      at org.codehaus.plexus.component.manager.AbstractComponentManager.startComponentLifecycle(AbstractComponentManager.java:142)
      at org.codehaus.plexus.component.manager.AbstractComponentManager.createComponentInstance(AbstractComponentManager.java:132)
      at org.codehaus.plexus.component.manager.ClassicSingletonComponentManager.getComponent(ClassicSingletonComponentManager.java:90)
      at org.codehaus.plexus.DefaultComponentLookupManager.lookup(DefaultComponentLookupManager.java:147)
      at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:333)
      at org.codehaus.plexus.component.composition.AbstractComponentComposer.findRequirement(AbstractComponentComposer.java:241)
      at org.codehaus.plexus.component.composition.FieldComponentComposer.assignRequirementToField(FieldComponentComposer.java:66)
      at org.codehaus.plexus.component.composition.FieldComponentComposer.assignRequirement(FieldComponentComposer.java:57)
      at org.codehaus.plexus.component.composition.AbstractComponentComposer.assembleComponent(AbstractComponentComposer.java:143)
      at org.codehaus.plexus.component.composition.DefaultComponentComposerManager.assembleComponent(DefaultComponentComposerManager.java:72)
      at org.codehaus.plexus.personality.plexus.lifecycle.phase.CompositionPhase.execute(CompositionPhase.java:46)
      at org.codehaus.plexus.lifecycle.AbstractLifecycleHandler.start(AbstractLifecycleHandler.java:128)
      at org.codehaus.plexus.component.manager.AbstractComponentManager.startComponentLifecycle(AbstractComponentManager.java:142)
      at org.codehaus.plexus.component.manager.AbstractComponentManager.createComponentInstance(AbstractComponentManager.java:132)
      at org.codehaus.plexus.component.manager.ClassicSingletonComponentManager.getComponent(ClassicSingletonComponentManager.java:90)
      at org.codehaus.plexus.DefaultComponentLookupManager.lookup(DefaultComponentLookupManager.java:147)
      at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:327)
      at org.codehaus.plexus.container.initialization.StartLoadOnStartComponentsPhase.execute(StartLoadOnStartComponentsPhase.java:68)
      at org.codehaus.plexus.DefaultPlexusContainer.initializePhases(DefaultPlexusContainer.java:886)
      at org.codehaus.plexus.DefaultPlexusContainer.initialize(DefaultPlexusContainer.java:834)
      at org.codehaus.plexus.DefaultPlexusContainer.construct(DefaultPlexusContainer.java:811)
      at org.codehaus.plexus.DefaultPlexusContainer.<init>(DefaultPlexusContainer.java:222)
      at org.codehaus.plexus.DefaultPlexusContainer.<init>(DefaultPlexusContainer.java:260)
      at org.codehaus.plexus.xwork.PlexusLifecycleListener.contextInitialized(PlexusLifecycleListener.java:76)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
      at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
      at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
      at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
      at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
      at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
      at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
      at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
      at org.apache.catalina.core.StandardService.start(StandardService.java:448)
      at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
      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:585)
      at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)

      And Archiva does'nt work anymore!!!!!
      Please help!

      Fanx.

        Issue Links

          Activity

          Brett Porter made changes -
          Field Original Value New Value
          Fix Version/s 1.0.x [ 14081 ]
          Hide
          Robert Watts added a comment -

          I have exactly the same problem, I am using archiva 1.0.2 on tomcat 5.5.26

          Show
          Robert Watts added a comment - I have exactly the same problem, I am using archiva 1.0.2 on tomcat 5.5.26
          Hide
          Brett Porter added a comment -

          one possible cause could be lock files in the Derby database - have you tried removing them?

          Show
          Brett Porter added a comment - one possible cause could be lock files in the Derby database - have you tried removing them?
          Hide
          Robert Watts added a comment -

          Just doing that very thing... removed .lck files in both archiva and users DB directory - worked a treat.

          Show
          Robert Watts added a comment - Just doing that very thing... removed .lck files in both archiva and users DB directory - worked a treat.
          Hide
          Denis Schettl added a comment -

          I had the same problem with tomcat on Linux (on different Archiva-versions). I found out, that stopping tomcat does not stop archiva-processes in backgroud (ps -efx | grep archiva). When I killed this process, this error disapeers. When I didn't kill that process and start tomcat again, I started an second archiva-instance and I got this error message.
          Maybe there are some tasks running in backgroud (db-updates, db-jobs), so that archiva will not ended properly.
          The same installation on Windows (same Archiva-version und same tomcat-version) don't have this problem ....
          I don't have check this for the archiva 1.1.1 version, because have already definded my maintanance-processes ....

          I hope, this information will help you ....

          Show
          Denis Schettl added a comment - I had the same problem with tomcat on Linux (on different Archiva-versions). I found out, that stopping tomcat does not stop archiva-processes in backgroud (ps -efx | grep archiva). When I killed this process, this error disapeers. When I didn't kill that process and start tomcat again, I started an second archiva-instance and I got this error message. Maybe there are some tasks running in backgroud (db-updates, db-jobs), so that archiva will not ended properly. The same installation on Windows (same Archiva-version und same tomcat-version) don't have this problem .... I don't have check this for the archiva 1.1.1 version, because have already definded my maintanance-processes .... I hope, this information will help you ....
          Hide
          Lennart Schedin added a comment -

          I'm having the same problem using apache-tomcat-6.0.18 and apache-archiva-1.1.3 on Ubuntu 8: the Tomcat process will not terminate, thus causing next start of Tomcat to fail to load the database for Archiva.

          I have tried both Derby and H2database and the problem is the same.

          Show
          Lennart Schedin added a comment - I'm having the same problem using apache-tomcat-6.0.18 and apache-archiva-1.1.3 on Ubuntu 8: the Tomcat process will not terminate, thus causing next start of Tomcat to fail to load the database for Archiva. I have tried both Derby and H2database and the problem is the same.
          Brett Porter made changes -
          Link This issue is duplicated by MRM-1014 [ MRM-1014 ]
          Hide
          Uwe Stuehler added a comment -

          So is this fixed or not? MRM-1014 was marked a duplicate of this and is closed.

          Show
          Uwe Stuehler added a comment - So is this fixed or not? MRM-1014 was marked a duplicate of this and is closed.
          Hide
          Brett Porter added a comment -

          the other issue being closed as a duplicate just means that the emphasis is on this ticket.

          Are you experiencing this problem? We could possibly use more data.

          Show
          Brett Porter added a comment - the other issue being closed as a duplicate just means that the emphasis is on this ticket. Are you experiencing this problem? We could possibly use more data.
          Olivier Lamy made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Assignee Olivier Lamy [ olamy ]
          Fix Version/s Backlog [ 13571 ]
          Resolution Duplicate [ 3 ]

            People

            • Assignee:
              Olivier Lamy
              Reporter:
              TOTTEREAU Benoît
            • Votes:
              3 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: