-
Type: Question
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 5.9.6-SNAPSHOT
-
Fix Version/s: None
-
Component/s: Runtime
At repository shutdown, the repository datasource is unavailable. Should re-work the shutdown dependencies.
2014-08-25 10:42:18,445 ERROR [localhost-startStop-2] [org.nuxeo.runtime.model.impl.ComponentInstanceImpl] Failed to deactivate component: service:org.nuxeo.ecm.core.repository.RepositoryServiceComponent
org.nuxeo.ecm.core.api.NuxeoException: org.nuxeo.ecm.core.storage.StorageException: Cannot connect to database
at org.nuxeo.ecm.core.storage.sql.VCSLockManager.close(VCSLockManager.java:147)
at org.nuxeo.ecm.core.storage.sql.RepositoryImpl.closeAllSessions(RepositoryImpl.java:435)
at org.nuxeo.ecm.core.storage.sql.RepositoryImpl.close(RepositoryImpl.java:411)
at org.nuxeo.ecm.core.storage.sql.ra.ManagedConnectionFactoryImpl.shutdown(ManagedConnectionFactoryImpl.java:298)
at org.nuxeo.ecm.core.storage.sql.ra.ConnectionFactoryImpl.shutdown(ConnectionFactoryImpl.java:191)
at org.nuxeo.ecm.core.repository.RepositoryService.shutdown(RepositoryService.java:58)
at org.nuxeo.ecm.core.repository.RepositoryService.deactivate(RepositoryService.java:51)
at org.nuxeo.runtime.model.impl.ComponentInstanceImpl.deactivate(ComponentInstanceImpl.java:142)
at org.nuxeo.runtime.model.impl.RegistrationInfoImpl.deactivate(RegistrationInfoImpl.java:429)
at org.nuxeo.runtime.model.impl.RegistrationInfoImpl.unresolve(RegistrationInfoImpl.java:462)
at org.nuxeo.runtime.model.impl.ComponentRegistry.unresolveComponent(ComponentRegistry.java:212)
at org.nuxeo.runtime.model.impl.ComponentRegistry.removeComponent(ComponentRegistry.java:141)
at org.nuxeo.runtime.model.impl.ComponentManagerImpl.unregister(ComponentManagerImpl.java:192)
at org.nuxeo.runtime.model.impl.ShutdownTask.shutdown(ShutdownTask.java:62)
at org.nuxeo.runtime.model.impl.ShutdownTask.shutdown(ShutdownTask.java:35)
at org.nuxeo.runtime.model.impl.ComponentManagerImpl.shutdown(ComponentManagerImpl.java:111)
at org.nuxeo.runtime.AbstractRuntimeService.stop(AbstractRuntimeService.java:149)
at org.nuxeo.runtime.api.Framework.shutdown(Framework.java:173)
at org.nuxeo.runtime.osgi.OSGiRuntimeActivator.stop(OSGiRuntimeActivator.java:92)
at org.nuxeo.osgi.BundleImpl.shutdown(BundleImpl.java:331)
at org.nuxeo.osgi.BundleRegistry.shutdown(BundleRegistry.java:211)
at org.nuxeo.osgi.OSGiAdapter.shutdown(OSGiAdapter.java:157)
at org.nuxeo.osgi.application.loader.FrameworkLoader.doStop(FrameworkLoader.java:240)
at org.nuxeo.osgi.application.loader.FrameworkLoader.stop(FrameworkLoader.java:126)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.nuxeo.osgi.application.FrameworkBootstrap.stop(FrameworkBootstrap.java:142)
at org.nuxeo.runtime.tomcat.NuxeoLauncher.handleEvent(NuxeoLauncher.java:120)
at org.nuxeo.runtime.tomcat.NuxeoLauncher.lifecycleEvent(NuxeoLauncher.java:89)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:347)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5598)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1575)
at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1564)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: org.nuxeo.ecm.core.storage.StorageException: Cannot connect to database
at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapper.connect(JDBCMapper.java:1429)
at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapperConnector.invoke(JDBCMapperConnector.java:54)
at $Proxy87.close(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapperTxSuspender.doInvoke(JDBCMapperTxSuspender.java:23)
at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapperTxSuspender.invoke(JDBCMapperTxSuspender.java:34)
at $Proxy87.close(Unknown Source)
at org.nuxeo.ecm.core.storage.sql.VCSLockManager.close(VCSLockManager.java:145)
... 43 more
Caused by: java.sql.SQLException: Cannot find datasource: repository_default
at org.nuxeo.runtime.datasource.ConnectionHelper.getDataSource(ConnectionHelper.java:962)
at org.nuxeo.runtime.datasource.ConnectionHelper.getConnection(ConnectionHelper.java:872)
at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCConnection.openBaseConnection(JDBCConnection.java:151)
at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapper.connect(JDBCMapper.java:1427)
... 53 more
Caused by: javax.naming.NameNotFoundException: Name [repository_default] is not bound in this Context. Unable to find [repository_default].
at org.apache.naming.NamingContext.lookup(NamingContext.java:820)
at org.apache.naming.NamingContext.lookup(NamingContext.java:154)
at org.apache.naming.NamingContext.lookup(NamingContext.java:831)
at org.apache.naming.NamingContext.lookup(NamingContext.java:154)
at org.apache.naming.NamingContext.lookup(NamingContext.java:831)
at org.apache.naming.NamingContext.lookup(NamingContext.java:154)
at org.apache.naming.NamingContext.lookup(NamingContext.java:831)
at org.apache.naming.NamingContext.lookup(NamingContext.java:168)
at org.apache.naming.SelectorContext.lookup(SelectorContext.java:158)
at javax.naming.InitialContext.lookup(InitialContext.java:411)
at org.nuxeo.runtime.api.DataSourceHelper.getDataSource(DataSourceHelper.java:130)
at org.nuxeo.runtime.api.DataSourceHelper.getDataSource(DataSourceHelper.java:118)
at org.nuxeo.runtime.datasource.ConnectionHelper.getDataSource(ConnectionHelper.java:952)
... 56 more
- depends on
-
NXP-14728 activate managed datasource mode by default in tomcat
- Resolved