Hi,

I'm using a H2 database (H2 1.2.127) together with eclipse galileo and
hibernate (Hibernate Tools 3.2.4). When I try to launch a hibernate
code generation from the database on eclipse, I get the following
error (actual filename has been replaced by tag <filename>):

org.hibernate.exception.GenericJDBCException: Getting database
metadata
Getting database metadata
  org.h2.jdbc.JdbcSQLException: Unsupported database file version or
invalid file header in file <filename> [90048-120]
  Unsupported database file version or invalid file header in file
<filename> [90048-120]
    org.h2.jdbc.JdbcSQLException: Unsupported database file version or
invalid file header in file <filename>[90048-120]
    Unsupported database file version or invalid file header in file
<filename> [90048-120]


FYI, here is my hibernate.cfg.xml (actual database filename also
replaced by <filename>):

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd";>
<hibernate-configuration>
    <session-factory>
        <property
name="hibernate.bytecode.use_reflection_optimizer">false</property>
        <property
name="hibernate.connection.driver_class">org.h2.Driver</property>
            <property name="hibernate.connection.url">jdbc:h2:<filename></
property>
        <property name="hibernate.connection.username">sa</property>
        <property
name="hibernate.dialect">org.hibernate.dialect.H2Dialect</property>
    </session-factory>
</hibernate-configuration>


I do not understand why there is a problem with the database file,
because everything works fine when I open it from the H2 Console.

Does anyone have any ideas of what could cause this error?

Thanks in advance,
Vincent

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
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