Re: database is locked

2016-04-13 Thread Anton
On Wed, Apr 13, 2016 at 3:28 PM, John D. Ament wrote: > I'll try to see if I can come up > with an example on how to configure this for h2 > I found a solution. The connection string needs to be setup in server mode, eg, jdbc:h2:tcp://localhost/~/home/mydb;AUTO_SERVER=TRUE"

Re: database is locked

2016-04-13 Thread John D. Ament
The problem is that both sqlite and h2 are single user databases. I suspect whats happening is that the EMF is being created multiple times and trying to consume multiple connections. I'll try to see if I can come up with an example on how to configure this for h2, but I don't have sqlite local.

Re: database is locked

2016-04-13 Thread Anton
On Wed, Apr 13, 2016 at 12:44 PM, John D. Ament wrote: > Just wondering, does this happen the first time the route gets hit or > subsequent times? > Yes, it appears to happen the first time. > > Have you tried providing an explicit EntityManagerFactory bean to the > endpoint? > I havent tried th

Re: database is locked

2016-04-13 Thread John D. Ament
Hi Anton, Just wondering, does this happen the first time the route gets hit or subsequent times? Have you tried providing an explicit EntityManagerFactory bean to the endpoint? John On Wed, Apr 13, 2016 at 6:24 AM Anton wrote: > Hi > > I tried changing this from sqlite to h2, and now I get a

Re: database is locked

2016-04-13 Thread Anton
Hi I tried changing this from sqlite to h2, and now I get a similar error: Caused by: java.lang.IllegalStateException: The file is locked: nio:/home/anton/twdb.mv.db [1.4.191/7] at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:773) at org.h2.mvstore.FileStore.open(FileStore.java