2

I'm trying to develop some app on H2 database, but the problem is I can't run JDBC queries and using web-interface of the database at the same time. The exception log looks as follows:

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-169]
    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 H2 launch I've chosen Server mode but this doesn't help. The image is given below http://gyazo.com/1c59fe77bf29e2061da1a0894e18a471

gabriel angelos
  • 349
  • 1
  • 9
  • 23
  • possible duplicate of [How to run H2 database in server mode?](http://stackoverflow.com/questions/9318116/how-to-run-h2-database-in-server-mode) – Kariem May 14 '14 at 19:06

1 Answers1

5

I found it, it takes 2 steps to complete it: add String ";AUTO_SERVER=TRUE" to both jdbc String in application and server web-form.

My string using test database is: "jdbc:h2:~/test;AUTO_SERVER=TRUE"

gabriel angelos
  • 349
  • 1
  • 9
  • 23