Hibernate version: 3.0
Full stack trace of any exception that occurs:
org.hibernate.HibernateException: problem parsing configurationhibernate.cfg.xml
org.dom4j.DocumentException: invalid stored block lengths Nested exception: invalid stored block lengths
When executing following statement i get
Code:
Configuration hConfiguration = new Configuration().configure("hibernate.cfg.xml");
My "hibernate.cfg.xml" is there in a jar file which is on my classpath.
Below mentioned is my hibernate.cfg.xml.
<?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 name="java:/hibernate/HibernateFactory">
<property name="show_sql">false</property>
<property name="connection.datasource">
java:comp/env/jdbc/DataSource
</property>
<property name="dialect">org.hibernate.dialect.Oracle9Dialect</property>
<property name="hibernate.transaction.factory_class">
org.hibernate.transaction.JTATransactionFactory
</property>
<property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
<property name="hibernate.connection.provider_class">
org.hibernate.connection.DatasourceConnectionProvider
</property>
<property name="hibernate.cache.provider_class">
org.hibernate.cache.EhCacheProvider
</property>
<property name="hibernate.jdbc.batch_size">0</property>
<!--
My Resource mappings
-->
</session-factory>
</hibernate-configuration>
Can anybody please let me know what is going wrong ?
Thanks.