That is really strange!. I've been using H2 for quite a few years and never had a corrupted DB. What environment are you running on? And what connection string are you using? JVM version?

And do you know when it happened?. Was the application running and crashed?. Or it was fine, then shutdown and on startup it was corrupted?

Ryan




On 9/01/2013 5:16 AM, Peter wrote:
Hi everyone,

I got a corrupted DB file and the expected error "File corrupted while reading record: "wrong checksum". Possible solution: use the recovery tool [90030-163]". H2 Version is 1.3.163.

After having a look at the 32MB h2.db file (plaintext), I found strange content - the file was full with java class file content, bytecode, some license agreements etc. After a quick research I fount out, that SOME of the jar-files of the application were appended to the db file. The application is an eclipse rcp based app using hibernate for persistence with H2. The application includes its own copy of the JRE and for example the whole content of the rt.jar was byte-wise copied into the db file.

I know that this might have nothing to do with H2Database. But I have really no clue how this could happen, so could it be that H2 is messing something up after all? Or especially in combination with hibernate or something? No other file got affected than the h2 db file.

By the way, this is the second time I encountered this strange behavior. First time was half a year ago on a very different system (but same application). That time, I ignored the strange error, but now i am a bit concerned. The file could easily be fixed by removing the strange content which left the original 500KB db and as far as I know, there was no data loss (but I cannot be totally sure about that - it's not my data).

I am also very happy, if somebody got a hint what else could make such strange things.

Greetings and thanks a lot in advance,
Peter
--
You received this message because you are subscribed to the Google Groups "H2 Database" group. To view this discussion on the web visit https://groups.google.com/d/msg/h2-database/-/CBzzAbYo4McJ.
To post to this group, send email to h2-database@googlegroups.com.
To unsubscribe from this group, send email to h2-database+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.


--
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to h2-database@googlegroups.com.
To unsubscribe from this group, send email to 
h2-database+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to