You are not logged in.
Pages: 1
Hello,
j'ai qq trucs à tester côté site, et je ne l'ai jamais utilisée (j'utilise l'appli de démo, donc elle est lancée automatiquement en même temps que le CMS). En voulant y accéder, j'ai cette erreur :
java.lang.RuntimeException: Unable to get Connection from pool SQL-j2c1c5hc
at org.ametys.core.datasource.ConnectionHelper.getConnection(ConnectionHelper.java:125)
at org.ametys.core.migration.version.storage.SqlVersionStorage._internalUpgrade(SqlVersionStorage.java:349)
at org.ametys.core.migration.version.storage.SqlVersionStorage.getVersions(SqlVersionStorage.java:124)
at org.ametys.core.migration.version.handler.StorageBasedVersionHandler.getVersions(StorageBasedVersionHandler.java:75)
at org.ametys.core.migration.MigrationEngine.getVersions(MigrationEngine.java:259)
at org.ametys.core.migration.MigrationEngine._doMigration(MigrationEngine.java:148)
at org.ametys.core.migration.MigrationEngine.migrate(MigrationEngine.java:115)
at org.ametys.runtime.servlet.RuntimeServlet._initMigration(RuntimeServlet.java:547)
at org.ametys.runtime.servlet.RuntimeServlet.doMigrationAndInit(RuntimeServlet.java:508)
at org.ametys.runtime.servlet.RuntimeServlet._initAmetys(RuntimeServlet.java:435)
at org.ametys.runtime.servlet.RuntimeServlet.init(RuntimeServlet.java:267)
at javax.servlet.GenericServlet.init(GenericServlet.java:143)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1106)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1063)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:960)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4673)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4980)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:683)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:658)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:662)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:689)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1888)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:123)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:582)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1617)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:318)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:893)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:795)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1328)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1318)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:866)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:249)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:428)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:922)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.startup.Catalina.start(Catalina.java:772)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:347)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:478)
Caused by: java.sql.SQLException: Failed to start database '../../webapps/cms/WEB-INF/data/data/db' with class loader java.net.URLClassLoader@5702b3b1, see the next exception for details.
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.seeNextException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
at org.apache.derby.jdbc.InternalDriver$1.run(Unknown Source)
at org.apache.derby.jdbc.InternalDriver$1.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
at org.apache.derby.jdbc.InternalDriver.getNewEmbedConnection(Unknown Source)
at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source)
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:681)
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:229)
at org.apache.commons.dbcp2.DriverManagerConnectionFactory.createConnection(DriverManagerConnectionFactory.java:121)
at org.apache.commons.dbcp2.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:374)
at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:565)
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:307)
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:428)
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:232)
at org.apache.commons.dbcp2.PoolingDataSource.getConnection(PoolingDataSource.java:141)
at org.ametys.core.datasource.ConnectionHelper.getConnection(ConnectionHelper.java:121)
... 55 more
Caused by: ERROR XJ040: Failed to start database '../../webapps/cms/WEB-INF/data/data/db' with class loader java.net.URLClassLoader@5702b3b1, see the next exception for details.
at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at org.apache.derby.impl.jdbc.SQLExceptionFactory.wrapArgsForTransportAcrossDRDA(Unknown Source)
... 77 more
Caused by: ERROR XSDB6: Another instance of Derby may have already booted the database /media/jon/Projets/Projets/PicDigital/Ametys4.7/Ametys/webapps/cms/WEB-INF/data/data/db.
at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.privGetJBMSLockOnDB(Unknown Source)
at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.getJBMSLockOnDB(Unknown Source)
at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source)
at org.apache.derby.impl.services.monitor.FileMonitor.startModule(Unknown Source)
at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown Source)
at org.apache.derby.impl.store.raw.RawStore$6.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
at org.apache.derby.impl.store.raw.RawStore.bootServiceModule(Unknown Source)
at org.apache.derby.impl.store.raw.RawStore.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source)
at org.apache.derby.impl.services.monitor.FileMonitor.startModule(Unknown Source)
at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown Source)
at org.apache.derby.impl.store.access.RAMAccessManager$5.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
at org.apache.derby.impl.store.access.RAMAccessManager.bootServiceModule(Unknown Source)
at org.apache.derby.impl.store.access.RAMAccessManager.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source)
at org.apache.derby.impl.services.monitor.FileMonitor.startModule(Unknown Source)
at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown Source)
at org.apache.derby.impl.db.BasicDatabase$5.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
at org.apache.derby.impl.db.BasicDatabase.bootServiceModule(Unknown Source)
at org.apache.derby.impl.db.BasicDatabase.bootStore(Unknown Source)
at org.apache.derby.impl.db.BasicDatabase.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.startProviderService(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.findProviderAndStartService(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.startPersistentService(Unknown Source)
at org.apache.derby.iapi.services.monitor.Monitor.startPersistentService(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection$4.run(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection$4.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
at org.apache.derby.impl.jdbc.EmbedConnection.startPersistentService(Unknown Source)
... 74 more
J'ai essayé de comprendre pourquoi j'avais cette erreur avec Derby, mais sans succès. Une idée ?
Merci !
Offline
Derby est une base de donnée embarquée et elle ne peut être lancée qu'une seule fois.
Dans ton cas, le BO la démarre et le FO essaie de la démarrer aussi.
Sol1 : ne pas utiliser derby mais une vraie base de données comme mysql par ex. c'est la solution que je recommande pour s'approcher d'un système en prod, mais cela nécessite de reconfigurer tout ce qui y est stocké (profils, utilisateurs...).
Sol2 : comme sur la démo, enlever les jars derby du BO et du FO et en mettre un seul au niveau du dossier de lib de tomcat
Raphael Franchet
Expert Ametys
Offline
Salut Raph !
Super, merci pour ta réponse !
Bonne journée à toi !
Offline
Pages: 1