Dear Ryan,

the application is bundled with a copy of the 32bit JRE Version 1.6.0_37.
The connection is made with the following javax.sql.datasource bean 
exported through spring-dm osgi mechanism:

<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
p:driverClassName="org.h2.Driver" 
p:url="jdbc:h2:${h2db.path}/${h2db.dbname};IGNORECASE=TRUE"
p:username="${h2db.admin}" p:password="${h2db.pass}" 
init-method="createDataSource"
destroy-method="close" />

The bean is then used in a different osgi bundle as datasource for a 
hibernate session factory.

<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<property name="configurationClass" 
value="org.hibernate.cfg.AnnotationConfiguration" />
<property name="configLocation" value="hibernate.cfg.xml" />
<property name="dataSource" ref="dataSource" />
</bean>

Right now, I can't tell which windows version was used. Neither do I know 
how it happened. I'm trying to get these informations - but that's a bit 
difficult because the software is used in production and I get the error 
reports forwarded from a client who distributes the software to endusers. 
So I have no direct contact to the real users of the application.

Greetings
Onno

Am Mittwoch, 9. Januar 2013 04:12:34 UTC+1 schrieb Kartweel:
>
> 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 
> > [email protected]<javascript:>. 
>
> > To unsubscribe from this group, send email to 
> > [email protected] <javascript:>. 
> > 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 view this discussion on the web visit 
https://groups.google.com/d/msg/h2-database/-/GCbYCkf0zV4J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to