Using embedded H2 DB with multiple EAP instances, H2 DB could be already in use: "Locked by another process"
Issue
There are 2 applications which use H2 database. It is working only on first started JVM but when second JVM start, following errors occurred.
Caused by: 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-164]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:329) [h2-1.3.164.jar:1.3.164]
at org.h2.message.DbException.get(DbException.java:169) [h2-1.3.164.jar:1.3.164]
Environment
Red Hat JBoss Enterprise Application Platform
- 6.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
