
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
java.sql.SQLException: database disk image is malformed - Read from SQLite
Hello everybody,
title tells the main problem:
I want to read from a SQLite database file, but i always get the error message "database disk image is malformed".
Full Error:
Exception in component tDBInput_5 (ImportContent) java.sql.SQLException: database disk image is malformed at org.sqlite.DB.execute(DB.java:275) at org.sqlite.Stmt.exec(Stmt.java:56) at org.sqlite.Stmt.executeQuery(Stmt.java:90) at local_project.importcontent_0_1.ImportContent.tDBInput_5Process(ImportContent.java:1507) at local_project.importcontent_0_1.ImportContent.tDBConnection_5Process(ImportContent.java:471) at local_project.importcontent_0_1.ImportContent.runJobInTOS(ImportContent.java:2420) at local_project.importcontent_0_1.ImportContent.main(ImportContent.java:2269) [statistics] disconnected
I tried multiple versions of a job:
tDBConnection(SQLite) --onSubjobOk--> tDBInput --row1--> tMap -> etc.
tDBInput(SQLite) --row1--> tMap -> etc. (with DB Connection from Metadata)
When i create the metadata, i can test connect to the db-file without problems. I can also read the table schemata from database file without problems.
I can open the database file with DB Browser for SQLite without problems.
I can query the table (it is just one) just fine via DB Browser or Terminal.
Running "pragma integrity_check" runs just fine without any problems ("ok")
Additional Informations:
The database file is very big (>4 GB)
The database file has an .sql ending ( i also tried renaming the file to .db, no change)
The database file was created by an external source.
I use Talend Open Studio For Data Integration 7.0.1 and Java Version 8 Update 191
Did anyone run into the same problem?
Regards in advance from Germany
Stefan

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
What's SQLite database version are you using and what's your Input query?
Best regards
Sabrina

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
the sqlite version used to create the database file is 2.6.0.
The Query is autogenerated by drag & drop the schema to the job. i kept that because i needed all columns & all rows
"SELECT CONTENT.SkriptID, CONTENT.ZeilenID, CONTENT._order, CONTENT.url, CONTENT.snippet, CONTENT.title, CONTENT._Case, CONTENT.Content, CONTENT.Search_Term FROM CONTENT"
As described, generating the meta-data & schma works without problems.
Is that of any help?
Regards
Stefan

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would like to bump my question after some time without answers.
Please tell me if this is not acceptable in this community.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
It seems your file has got corrupted and not Talend tool issue. I could find the below links while doing a quick search of the issue. Could you please check these details?
https://techblog.dorogin.com/sqliteexception-database-disk-image-is-malformed-77e59d547c50
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
