Visit Jeremy's Blog.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 07-10-2009, 10:47 AM   #1
LQ Newbie
Registered: Feb 2009
Distribution: Arch
Posts: 13

Rep: Reputation: 0
sqlite jdbc Exception: unable to open database file

Not sure if I'm going to be able to get an answer in this forum, however if there is anyone who knows anything about this error please let me know.

I get this error when trying to write to an already existing sqlite database.

java.sql.SQLException: unable to open database file
at org.sqlite.DB.execute(
at org.sqlite.PrepStmt.execute(

There are no problems writing to it on creation or reading from it after creation.

There are no errors when changing the database using the command line.

Not a very descriptive error message and I checked the source code and can't figure out why it is even throwing this exception.
Old 07-10-2009, 03:40 PM   #2
LQ Newbie
Registered: Feb 2009
Distribution: Arch
Posts: 13

Original Poster
Rep: Reputation: 0
Figured it out the folder that contains the database file must be writeable by the user and since it was a web app it was running as a user that did not have the correct permissions.


java, sqlite

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sqlite Database image malformed ravindranvasudevan Programming 6 08-10-2009 03:37 AM
Java JDBC-Exception: Communications link failure Swift&Smart Programming 1 12-05-2007 11:12 PM
SQLite database security - doesn't exist? vharishankar Linux - Security 2 11-30-2005 08:40 PM
SQLite database backup ddpicard Linux - Software 2 11-01-2004 06:54 PM
postgresql jdbc database server...????????? Sridhar Guntur Linux - Software 1 10-17-2002 02:42 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:33 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration