-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Obtaining Configuration object throws exception
PostPosted: Fri Jun 27, 2008 12:53 pm 
Newbie

Joined: Fri Apr 13, 2007 10:58 am
Posts: 10
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.