-->
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: Could not configure datastore from file: hibernate.cfg.xml
PostPosted: Mon Jun 07, 2004 2:47 pm 
Newbie

Joined: Mon Jun 07, 2004 12:09 pm
Posts: 1
Hi,

I'm having trouble getting Hibernate to work on a new machine. I have made a copy of everything from a working system, but I get an XML parsing error when I try to run on a new system.

In both cases, my classpath is setup from Ant, so that should not be different. It appears I must be picking up different versions of xerces or other XML-related jar files, but I cannot tell which or where.

I am trying to run SchemaExport. See my error message and hibernate.cfg.xml below.

Does anyone have suggestions?

Using Hibernate 2.1.4 (also tried 2.1.1)
MySQL 4.0.18

Thanks,

Lai

------ hibernate.cfg.xml --------
<?xml version="1.0"?>

<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd" [
<!ENTITY fileList SYSTEM "file:hbnfiles.xml">
]>

<hibernate-configuration>

<session-factory>

<!-- This is a list of all the mapping files to
be used for this configuration.
-->

&fileList;

</session-factory>

</hibernate-configuration>

-------- hbnfiles.xml ---------
<mapping resource="com/ibexprocess/configurator/dataAnalysis/AbstractVariableValue.hbm.xml"/>
<mapping resource="com/ibexprocess/configurator/dataAnalysis/DefaultValue.hbm.xml"/>
<mapping resource="com/ibexprocess/configurator/dataAnalysis/MaintenanceAlarmValue.hbm.xml"/>
[ more lines like these]

-------- Output from Ant

[java] 2004-06-07 12:18:18,765 [main] INFO net.sf.hibernate.cfg.Environment - Hibernate 2.1.4
[java] 2004-06-07 12:18:18,785 [main] INFO net.sf.hibernate.cfg.Environment - loaded properties from resource hibernate.properties: {hibernate.connection.username=root, hibernate.connection.password=, hibernate.cglib.use_reflection_optimizer=true, hibernate.dialect=net.sf.hibernate.dialect.MySQLDialect, hibernate.show_sql=true, hibernate.connection.url=jdbc:mysql://localhost/DNC2_0, hibernate.connection.driver_class=com.mysql.jdbc.Driver}
[java] 2004-06-07 12:18:18,795 [main] INFO net.sf.hibernate.cfg.Environment - using CGLIB reflection optimizer
[java] 2004-06-07 12:18:18,845 [main] INFO net.sf.hibernate.cfg.Configuration - Mapping file: hibernate.cfg.xml
[java] 2004-06-07 12:18:20,668 [main] ERROR net.sf.hibernate.cfg.Configuration - Could not configure datastore from file: hibernate.cfg.xml
[java] org.dom4j.DocumentException: null Nested exception: null
[java] at org.dom4j.io.SAXReader.read(SAXReader.java:358)
[java] at org.dom4j.io.SAXReader.read(SAXReader.java:219)
[java] at net.sf.hibernate.cfg.Configuration.addFile(Configuration.java:169)
[java] at net.sf.hibernate.tool.hbm2ddl.SchemaExport.main(SchemaExport.java:289)
[java] Nested exception:
[java] java.lang.NullPointerException
[java] at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:969)
[java] at org.dom4j.io.SAXReader.read(SAXReader.java:339)
[java] at org.dom4j.io.SAXReader.read(SAXReader.java:219)
[java] at net.sf.hibernate.cfg.Configuration.addFile(Configuration.java:169)
[java] at net.sf.hibernate.tool.hbm2ddl.SchemaExport.main(SchemaExport.java:289)
[java] 2004-06-07 12:18:20,728 [main] ERROR net.sf.hibernate.tool.hbm2ddl.SchemaExport - Error creating schema
[java] net.sf.hibernate.MappingException: org.dom4j.DocumentException: null Nested exception: null
[java] at net.sf.hibernate.cfg.Configuration.addFile(Configuration.java:176)
[java] at net.sf.hibernate.tool.hbm2ddl.SchemaExport.main(SchemaExport.java:289)
[java] Caused by: org.dom4j.DocumentException: null Nested exception: null
[java] at org.dom4j.io.SAXReader.read(SAXReader.java:358)
[java] at org.dom4j.io.SAXReader.read(SAXReader.java:219)
[java] at net.sf.hibernate.cfg.Configuration.addFile(Configuration.java:169)
[java] ... 1 more
[java] net.sf.hibernate.MappingException: org.dom4j.DocumentException: null Nested exception: null
[java] at net.sf.hibernate.cfg.Configuration.addFile(Configuration.java:176)
[java] at net.sf.hibernate.tool.hbm2ddl.SchemaExport.main(SchemaExport.java:289)
[java] Caused by: org.dom4j.DocumentException: null Nested exception: null
[java] at org.dom4j.io.SAXReader.read(SAXReader.java:358)
[java] at org.dom4j.io.SAXReader.read(SAXReader.java:219)
[java] at net.sf.hibernate.cfg.Configuration.addFile(Configuration.java:169)
[java] ... 1 more


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.