1

I'm trying to connect to SQLite db from Jaspersoft ireports. I was able to create a datasource successfully but when I create a report using the datasource it gives me below error message.

java.sql.SQLException: file is encrypted or is not a database

I'm using below JDBC drivers:

JDBC Driver: org.sqlite.JDBC
JDBC URL: jdbc:sqlite:C:\\Users\\IT\\Desktop\\sqllitejdbc\\spiceworks_prod.sqlite

Any help is greatly appreciated.

Thanks.

  • Have you tried to connect to that database another way than JDBC? – Gustavo Straube Oct 08 '15 at 14:52
  • @GustavoStraube- I was able to open the db from DB Browser for SQLite. It's just when I try to create a report in jaspersoft it gives me an error message. – user3055603 Oct 08 '15 at 14:56
  • Perhaps it's a version problem. Can you confirm that your database was created using SQLite 3? – Gustavo Straube Oct 08 '15 at 16:45
  • Check this out: http://stackoverflow.com/questions/12803140/java-jdbc-driver-sqlite-3-7-2-unable-to-open-database-test-db-file-is-encry – Gustavo Straube Oct 08 '15 at 16:46
  • @Gustavo Straube- Here is the sqlite version: SELECT sqlite_version(); gave me this SQlite version: 3.8.10.2. And PRAGMA compile_options listed this: ENABLE_COLUMN_METADATA; ENABLE_FTS3; ENABLE_FTS4; ENABLE_RTREE; SYSTEM_MALLOC; THREADSAFE=1; – user3055603 Oct 08 '15 at 17:00
  • @Exocom- Any inputs/suggestions on this? Thanks. – user3055603 Oct 08 '15 at 17:18
  • I'm sure you already did this, but searching the web I found some cases where the database file was corrupted. Do you think it could be your case? Sorry for don't have any useful suggestion now. – Gustavo Straube Oct 08 '15 at 19:29
  • Forget my last comment about the file corruption. You've already said that you can access from DB Browser. – Gustavo Straube Oct 08 '15 at 19:30

1 Answers1

0

JDBC Driver: org.sqlite.JDBC JDBC URL: jdbc:sqlite:C:\Users\IT\Desktop\sqllitejdbc\wwe.sqlite

this is how i gave the Driver and URL but it does not work before that i gave jre file(sqlitejdbc-v056) to the classpath

kitiya
  • 15
  • 5