cancel
Showing results for 
Search instead for 
Did you mean: 

Failed to initialize pool: Database may be already in use: "C:/opt/snaplogic/run/bstore-Emirates_Training-sidekick-dev-1.mv.db"

nagrajps
New Contributor

2018-10-29T08:52:38,841 E main [ ] Error while loading web app configuration. Shutting down, please verify the jcc properties. javax.servlet.ServletException: JCC cannot be initialized properly [Failed to initialize pool: Database may be already in use: “C:/opt/snaplogic/run/bstore-Emirates_Training-sidekick-dev-1.mv.db”. Possible solutions: close all other connection(s); use the server mode [90020-182]]
at com.snaplogic.common.web.RequestFilter.init(RequestFilter.java:139) ~[jcc-4.0.jar:?]
at org.eclipse.jetty.servlet.FilterHolder.initialize(FilterHolder.java:139) ~[jetty-servlet-9.4.0.v20161208.jar:9.4.0.v20161208]
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletH~[jetty-servlet-9.4.0.v20161208.jar:9.4.0.v20161208]andler.java:725) ~[jetty-servlet-9.4.0.v20161208.jar:9.4.0.v20161208]

8 REPLIES 8

dmiller
Former Employee

@nagrajps, when did you get this message? What were you trying to do?


Diane Miller

My intention is to develop custom snaps, for that i have followed the below link http://developer.snaplogic.com, i was trying to do the setup in windows machine, after following couple of steps as per the above link i got this exception.

Failed at this stage:

$ cd ~/opt/snaplogic/run/lib
$ java -jar jcc.war jcc

Received Exception:
2018-10-29T21:32:18,163 E main [ ] Error while loading web app configuration. Shutting down, please verify the jcc properties. javax.servlet.ServletException: JCC cannot be initialized properly [Failed to initialize pool: Database may be already in use: “C:/opt/snaplogic/run/bstore-Emirates_Training-sidekick-dev-1.mv.db”. Possible solutions: close all other connection(s); use the server mode [90020-182]]
at com.snaplogic.common.web.RequestFilter.init(RequestFilter.java:139) ~[jcc-4.0.jar:?]
at org.eclipse.jetty.servlet.FilterHolder.initialize(FilterHolder.java:139) ~[jetty-servlet-9.4.0.v20161208.jar:9.4.0.v20161208]
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:725) ~[jetty-servlet-9.4.0.v20161208.jar:9.4.0.v20161208]
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:348) ~[jetty-servlet-9.4.0.v20161208.jar:9.4.0.v20161208]
at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1480) ~[jetty-webapp-9.4.0.v20161208.jar:9.4.0.v20161208]

Caused by: org.h2.jdbc.JdbcSQLException: Database may be already in use: “C:/opt/snaplogic/run/bstore-Emirates_Training-sidekick-dev-1.mv.db”. Possible solutions: close all other connection(s); use the server mode [90020-182]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) ~[h2-1.4.182.jar:1.4.182]
at org.h2.message.DbException.get(DbException.java:168) ~[h2-1.4.182.jar:1.4.182]
at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:107) ~[h2-1.4.182.jar:1.4.182]
at org.h2.engine.Database.getPageStore(Database.java:2376) ~[h2-1.4.182.jar:1.4.182]
at org.h2.engine.Database.open(Database.java:666) ~[h2-1.4.182.jar:1.4.182]
at org.h2.engine.Database.openDatabase(Database.java:266) ~[h2-1.4.182.jar:1.4.182]
at org.h2.engine.Database.(Database.java:260) ~[h2-1.4.182.jar:1.4.182]
at org.h2.engine.Engine.openSession(Engine.java:60) ~[h2-1.4.182.jar:1.4.182]
at org.h2.engine.Engine.openSession(Engine.java:167) ~[h2-1.4.182.jar:1.4.182]
at org.h2.engine.Engine.createSessionAndValidate(Engine.java:145) ~[h2-1.4.182.jar:1.4.182]
at org.h2.engine.Engine.createSession(Engine.java:128) ~[h2-1.4.182.jar:1.4.182]
at org.h2.engine.Engine.createSession(Engine.java:26) ~[h2-1.4.182.jar:1.4.182]
at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:347) ~[h2-1.4.182.jar:1.4.182]
at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:108) ~[h2-1.4.182.jar:1.4.182]
at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:92) ~[h2-1.4.182.jar:1.4.182]
at org.h2.Driver.connect(Driver.java:72) ~[h2-1.4.182.jar:1.4.182]
at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:120) ~[HikariCP-2.7.5-SLCURRENTCONTEXT-1.jar:?]
at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:126) ~[HikariCP-2.7.5-SLCURRENTCONTEXT-1.jar:?]
at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:375) ~[HikariCP-2.7.5-SLCURRENTCONTEXT-1.jar:?]
at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:204) ~[HikariCP-2.7.5-SLCURRENTCONTEXT-1.jar:?]
at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:459) ~[HikariCP-2.7.5-SLCURRENTCONTEXT-1.jar:?]
at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:533) ~[HikariCP-2.7.5-SLCURRENTCONTEXT-1.jar:?]
at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:114) ~[HikariCP-2.7.5-SLCURRENTCONTEXT-1.jar:?]
at com.snaplogic.cc.jstream.persistence.sql.DBType$1.initConnectionPool(DBType.java:221) ~[jcc-4.0.jar:?]
at com.snaplogic.cc.jstream.persistence.sql.DBType$1.initialize(DBType.java:89) ~[jcc-4.0.jar:?]
at com.snaplogic.cc.jstream.persistence.sql.SqlBackingStore.initialize(SqlBackingStore.java:75) ~[jcc-4.0.jar:?]
at com.snaplogic.common.AppInitializer.initBackingStore(AppInitializer.java:521) ~[jcc-4.0.jar:?]
at com.snaplogic.common.AppInitializer.initialize(AppInitializer.java:269) ~[jcc-4.0.jar:?]
at com.snaplogic.common.web.RequestFilter.configureApplication(RequestFilter.java:303) ~[jcc-4.0.jar:?]
at com.snaplogic.common.web.RequestFilter.init(RequestFilter.java:130) ~[jcc-4.0.jar:?]
… 18 more
Caused by: java.lang.IllegalStateException: The file is locked: nio:C:/opt/snaplogic/run/bstore-Emirates_Training-sidekick-dev-1.mv.db [1.4.182/7]
at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:762) ~[h2-1.4.182.jar:1.4.182]
at org.h2.mvstore.FileStore.open(FileStore.java:170) ~[h2-1.4.182.jar:1.4.182]
at org.h2.mvstore.MVStore.(MVStore.java:326) ~[h2-1.4.182.jar:1.4.182]
at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2736) ~[h2-1.4.182.jar:1.4.182]
at org.h2.mvstore.db.MVTableEngine$Store.(MVTableEngine.java:161) ~[h2-1.4.182.jar:1.4.182]
at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:97) ~[h2-1.4.182.jar:1.4.182]
at org.h2.engine.Database.getPageStore(Database.java:2376) ~[h2-1.4.182.jar:1.4.182]
at org.h2.engine.Database.open(Database.java:666) ~[h2-1.4.182.jar:1.4.182]

If you are using a generic JDBC account try adding “AUTO_SERVER” = “TRUE” to the Url properties.

image

You’ll also need to upload the h2 jar at ‘Jdbc jars’.

If you’ve explicitly specified the database URL try appending “;AUTO_SERVER=TRUE” to the URL everywhere you call it. You’ll want to do the same if you start the server with a script.

In any case you should start with a generic JDBC snap and account and verify that you can access the database with an existing snap. That lets you rule out any unexpected issues such as bad permissions, incompatible jars, etc., before you start developing your own code. That can save you a tremendous amount of effort down the road.

I have not open the snaplogic designer to make a connection, this issue is coming while doing configuration on groundplex, please refer below steps

I have modified – opt/snaplogic/etc/keys.properties file and /opt/snaplogic/etc/global.properties file after that while executing below commands got the exception.

cd ~/opt/snaplogic/run/lib
$ java -jar jcc.war jcc

For better understand my question, please go to this url Snap Development Documentation and seet the configuration section.

Exception:
2018-10-29T21:32:18,163 E main [ ] Error while loading web app configuration. Shutting down, please verify the jcc properties. javax.servlet.ServletException: JCC cannot be initialized properly [Failed to initialize pool: Database may be already in use: “C:/opt/snaplogic/run/bstore-Emirates_Training-sidekick-dev-1.mv.db”. Possible solutions: close all other connection(s); use the server mode [90020-182]]
at com.snaplogic.common.web.RequestFilter.init(RequestFilter.java:139) ~[jcc-4.0.jar:?]
at org.eclipse.jetty.servlet.FilterHolder.initialize(FilterHolder.java:139) ~[jetty-servlet-9.4.0.v20161208.jar:9.4.0.v20161208]
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:725) ~[jetty-servlet-9.4.0.v20161208.jar:9.4.0.v20161208]
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:348)