Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Greenpages H2 DB Locked(Cannot create greenpages db)
Greenpages H2 DB Locked [message #885292] Tue, 12 June 2012 14:53 Go to next message
Jay Flowers is currently offline Jay Flowers
Messages: 9
Registered: June 2012
Junior Member
When I try to run the data script while performing these steps (www.eclipse.org/virgo/documentation/greenpages-documentation-2.4.0.RELEASE/docs/html/ch02s03.html) I get this error:

C:\Projects\virgo.sample-greenpages\Product\db>java -cp ";C:\Users\flowersj\.m2\repository\com\h2database\h2\1.3.161\h2-1.3.161.jar" org.h2.tools.RunScript -url jdbc:h2:tcp://localhost/~/greenpages-db/greenpages -user greenpages -password pass -script db.sql
Exception in thread "main" org.h2.jdbc.JdbcSQLException: Database may be already in use: "Locked by another process". Possible solutions: close all other connection(s); use the server mode [90020-161]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
at org.h2.message.DbException.get(DbException.java:169)
at org.h2.message.DbException.get(DbException.java:146)
at org.h2.store.FileLock.getExceptionAlreadyInUse(FileLock.java:435)
at org.h2.store.FileLock.lockFile(FileLock.java:332)
at org.h2.store.FileLock.lock(FileLock.java:128)
at org.h2.engine.Database.open(Database.java:539)
at org.h2.engine.Database.openDatabase(Database.java:219)
at org.h2.engine.Database.<init>(Database.java:214)
at org.h2.engine.Engine.openSession(Engine.java:56)
at org.h2.engine.Engine.openSession(Engine.java:159)
at org.h2.engine.Engine.createSessionAndValidate(Engine.java:138)
at org.h2.engine.Engine.createSession(Engine.java:121)
at org.h2.server.TcpServerThread.run(TcpServerThread.java:124)
at java.lang.Thread.run(Unknown Source)

at org.h2.engine.SessionRemote.done(SessionRemote.java:538)
at org.h2.engine.SessionRemote.initTransfer(SessionRemote.java:109)
at org.h2.engine.SessionRemote.connectServer(SessionRemote.java:373)
at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:267)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:110)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:94)
at org.h2.Driver.connect(Driver.java:72)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.h2.tools.RunScript.process(RunScript.java:312)
at org.h2.tools.RunScript.runTool(RunScript.java:140)
at org.h2.tools.RunScript.main(RunScript.java:68)
Re: Greenpages H2 DB Locked [message #885310 is a reply to message #885292] Tue, 12 June 2012 15:37 Go to previous message
Jay Flowers is currently offline Jay Flowers
Messages: 9
Registered: June 2012
Junior Member
I found that I cannot have the Virgo server running at the same time as I execute the data.bat script. I thought that it was started in a mode that supported multiple connections.
Previous Topic:Web bundle does not start when url-pattern=*
Next Topic:Jetty WebSocket gets slow
Goto Forum:
  


Current Time: Sun Apr 20 02:58:00 EDT 2014

Powered by FUDForum. Page generated in 0.01733 seconds