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.  [ 7 posts ] 
Author Message
 Post subject: Schema-export's dependency on sourceforge
PostPosted: Wed Oct 29, 2003 11:05 pm 
Beginner
Beginner

Joined: Wed Oct 15, 2003 3:08 pm
Posts: 32
Our automated build system regenerates our DDL during each build using Hibernate's schema-export. A couple days ago we noticed that schema-export was mysteriously failing with the following error:

Quote:
Connection timed out: connect Nested exception: Connection timed out: connect


After some investigation I believe I narrowed the problem down to the the XDoclet generated .hbm.xml files. I've snipped the important part out, but this should be near the top of all .hbm.xml files:

Quote:
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping.dtd">


Note that the DTD is pointing to hibernate.sourceforge.net. Now, I believe schema-export is validating the XML against the DTD (which is a good thing). The problem is that the sourceforge site has been unavailable intermittantly for a few days. What is really concerning is that a remote web site can completely fail our local build system.

Would it be possible to move the DTD to a more reliable site? Or better yet, could we validate against a DTD that is included in the hibernate JAR?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 30, 2003 12:45 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
You should use a resolving XML parser, like the one that ships with Hibernate. This is a FAQ.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 30, 2003 8:28 am 
Beginner
Beginner

Joined: Wed Oct 15, 2003 3:08 pm
Posts: 32
Gavin, thank you for taking a look at the post and answering. I looked through the FAQs and found an entry that seems to be related to your answer. It deals with a problem with Resin and Dom4j and the inability to validate the XML.

My parser can validated XML entities against a DTD, but the problem is it can't do that sometimes because the DTD is unavailable. If I ping hibernate.sourceforge.net I cannot get a response, indicating that the site is down. This has been happening periodically over the last few days.

There was another post following mine by a user named "Marie" that was having the same connection problem with SF. Another user suggested removing the DTD lines so she could continue. While a temporary work-around, I think losing the DTD validation will make it more difficult to debug problems with the generated XML.

I think there may be a communication gap, either in my expressing our problem to you or my lack of understanding your solution. Hopefully this post will atleast make clearer my position so that you or someone on this board might help me see the light :).


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 30, 2003 8:44 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
I said "resolving XML parser". Google it.

Hibernate registers an EntityResolver with the parser. Some parsers ignore this.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 30, 2003 8:47 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Actually google doesn't seem to help. I may have the wrong term for this.

But anyway. Just use Xerces that ships with Hibernate.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 30, 2003 9:39 am 
Beginner
Beginner

Joined: Wed Oct 15, 2003 3:08 pm
Posts: 32
Ahhh, I understand what you are getting at now. Thank you for the clarification and your time!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 17, 2005 5:26 pm 
Senior
Senior

Joined: Sat Jul 17, 2004 5:16 pm
Posts: 143
More information here:

When upgrading to 3.0 this can happen if you forget to change the dtd in the mapping doc to the 3.0 dtd.

I believe this is because Hibernate has an entity resolver which will not rely on sourceforge to get the DTD, but only if the version is in sync with the jar. i.e. if it is the 2.0 dtd, that one isnt in the jar or entity resolver, but the 3.0 one is...

Here is what the exception might look like:

org.dom4j.DocumentException: Connection timed out: connect Nested exception: Connection timed out: connect

Regards,
Chris


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 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.