parsifal
parsifal

Reputation: 917

which jar be responsible for parsing hibernate.cfg.xml?

I met a configuration problem like below: when I am executing example by hibernate tool After I have write

<session-factory>

    <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
    <property name="hibernate.connection.url">jdbc:hsqldb:hsql://127.0.0.1</property>
    <property name="hibernate.connection.username">sa</property>
    <property name="connection.password"></property>
    <property name="connection.pool_size">1</property>
    <property name="hibernate.dialect"> org.hibernate.dialect.HSQLDialect</property>
    <property name="show_sql">true</property>
    <property name="hbm2ddl.auto">create</property>
    <mapping?resource="com/vaannila/course/Course.hbm.xml"/>

<session-factory>

and open HSQLDB connection(using java -cp ./lib/hsqldb.jar org.hsqldb.Server and java -cp ./lib/hsqldb.jar org.hsqldb.util.DatabaseManager), when I use Hibernate Code Generation in Eclipse, why it pop up the error message: enter image description here

In former step for the jar, instead of using package slf4j* ,I have used log4j, and I remember I have not include the changed jar to my classpath as vannilla required, do it have affects for the error? thanks first :)

Upvotes: 0

Views: 245

Answers (3)

Srikanth Venkatesh
Srikanth Venkatesh

Reputation: 2812

hibernate3.jar is responsible for parsing hibernate.cfg.xml.

      <property? //wrong
      <property> //correct

Upvotes: 1

Kothar
Kothar

Reputation: 6629

If the ? characters aren't visible in your editor, they are probably some other unicode space character which the XML parser doesn't recognise. You'll have to select each one and re-type a space character. (&nbsp; maybe?). Did you copy an example configuration from a web page?

Upvotes: 1

Bozho
Bozho

Reputation: 597362

Those question marks in <property?name.. are wrong - they should not be there. Remove them and try again.

Upvotes: 1

Related Questions