-->
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.  [ 2 posts ] 
Author Message
 Post subject: MappingException: Error reading resource... randomly...
PostPosted: Wed Sep 28, 2005 10:39 am 
Newbie

Joined: Wed Sep 28, 2005 6:33 am
Posts: 1
I have a stand alone application that it's launched every night, randomly some days appear an error when it's launched. The error it's like when i have a the network down.
In the night this script it's launched 4 times in sequence and only the first excecution have this error... the other 3 are ok!...
A name resolution problem of hibernate.sourceforge.net the first execution?

Ideas?

Thanks!

Matteo

Hibernate version:
3.0.1

Debug level Hibernate log excerpt:

Exception in thread "main" org.hibernate.MappingException: Error reading resource: com/myprojext/beans/mapping/NameMapping.hbm.xml
at org.hibernate.cfg.Configuration.addResource(Configuration.java:449)
at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1313)
at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1285)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1267)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1234)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1162)
at com.gullivertown.dbupdate.DbOnlineInstance.connect(DbOnlineInstance.java:28)
at com.gullivertown.importer.ParseTerminalDb.<init>(ParseTerminalDb.java:48)
at com.gullivertown.launcher.Launcher.main(Launcher.java:95)
Caused by: org.hibernate.MappingException: org.dom4j.DocumentException: hibernate.sourceforge.net Nested exception: hibernate.sourceforge.net
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:405)
at org.hibernate.cfg.Configuration.addResource(Configuration.java:446)
... 8 more
Caused by: org.dom4j.DocumentException: hibernate.sourceforge.net Nested exception: hibernate.sourceforge.net
at org.dom4j.io.SAXReader.read(SAXReader.java:353)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:395)
... 9 more


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 28, 2005 12:03 pm 
Regular
Regular

Joined: Fri Sep 09, 2005 11:35 am
Posts: 101
a network connection is not required for reading configuration files. The dtds are available in the hibernate jar file. It may be required if your mapping files have a different dtd specified than the one available in the jar file.

I had this connection problem when I upgraded to Hibernate 3 from Hibernate 2. The mapping files were using the hibernate 2 dtd. So while loading the configuration hibernate was going to the internet.


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

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.