Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java Hibernate Basics Persisting Data with Hibernate Fetching Data with Hibernate

Reeti Gupta
PLUS
Reeti Gupta
Courses Plus Student 3,400 Points

Error when hbm2ddl.auto valus is set to 'update' - Caused by: org.h2.jdbc.JdbcSQLException: Database may be already in u

Getting error - Caused by: org.h2.jdbc.JdbcSQLException: Database may be already in use: null. Possible solutions: close all other connection(s); use the server mode [90020-191]

contactmgr.mv.db persists post hbm2ddl.auto value = 'create' leading to above error. Even on deletion of this file, unable to run 'update' option .Get error as - Caused by: org.h2.jdbc.JdbcSQLException: Table "SYSTEM_SEQUENCES" not found; SQL statement: select sequence_name from information_schema.system_sequences [42102-191]

Karrtik Iyer
Karrtik Iyer
3,738 Points

I am also facing the same issue: Caused by: org.h2.jdbc.JdbcSQLException: Database may be already in use: null. Possible solutions: close all other connection(s); use the server mode [90020-192]. It seems we have to connect to H2 server in TCP mode, else H2 is still in use. This as per the below stack overflow link, it would be good to know from experts on how to resolve this issue. http://stackoverflow.com/questions/8158969/h2-database-error-database-may-be-already-in-use-locked-by-another-process

1 Answer

Einhart Z
Einhart Z
5,745 Points

Maybe you have multiple instances of the Application running ? Go to "View->Tool Windows->Run" and stop/close the running apps before staring a new one.

yes this is correct answer - stop application and restart from that window - if you just run again, then the second run will not work