Domanda

Using SQLite on Java with JDBC connector, I constantly get this "database locked" error on my code. The strange thing is that the jar file into which I have compressed my whole program works fine on my Macbook but gets this error when running on a Windows machine. Additionally:

The program has only one thread so it probably can't be a concurrency issue.

The code does some operations on the db before giving the error, so I don't believe this is a file permission issue either.

I didn't go into the details of my code because I assumed it's not necessary. Ready to do so by the way. Any ideas?

È stato utile?

Soluzione

I finally solved it. I uninstalled my up-to-date version of JRE (Java Update 7, which had come along when installing jdk7) and moved back to jre 6 Update 33.

Altri suggerimenti

Make sure you have write permissions in the location the the database is writing to.

We had issues when we upgrade to Windows 7 with UAC and admin rights with writing to locations such as "Program Files{our install location}"

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top