This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
I am on Hibernate 3.2 and trying to use the following mapping but it keeps telling me something is wrong with my mapping file. However, I cannot see any clue as for what element/attribute is wrong....
It might be some of the elements are deprecated. I got the code from some online tutorial that seems to be quite old.
Any idea if there is some consistent way to find out what the problem with the mapping file is...?
Maybe there is something with the role attribute of the set element. From what I have seen in latter samples, it looks like they now use name instead of role. Is it true....? But then if I change the role to name in the the collection element... I end up with two name attributes....
[ November 15, 2007: Message edited by: Joseph Sweet ]
[java] Caused by: org.dom4j.DocumentException: Connection timed out: connect Nested exception: Connection timed out: connect [java] at org.dom4j.io.SAXReader.read(SAXReader.java:484) [java] at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:499)
Looks like something to do with the dtd that you have defined in your mapping file. You said that you use Hibernate3, but the dtd still points to a older version:
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-1.1.dtd">
As per the Hibernate migration guide, you will have to use the 3.0 dtd in the mappings. Here's an extract from the document: