java.sql.SQLException: database disk image is malformed - Read from SQLite

Five Stars

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

Moderator

Re: java.sql.SQLException: database disk image is malformed - Read from SQLite

Hello,

What's SQLite database version are you using and what's your Input query?

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Five Stars

Re: java.sql.SQLException: database disk image is malformed - Read from SQLite

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

Five Stars

Re: java.sql.SQLException: database disk image is malformed - Read from SQLite

I would like to bump my question after some time without answers.

Please tell me if this is not acceptable in this community.

Employee

Re: java.sql.SQLException: database disk image is malformed - Read from SQLite

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://stackoverflow.com/questions/5274202/sqlite3-database-or-disk-is-full-the-database-disk-image...

 

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 :-)

 

    

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Why Companies Move to the Cloud: 7 Success Stories

Learn how and why companies are moving to the Cloud

Read Now