-->
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.  [ 5 posts ] 
Author Message
 Post subject: spurious connection timeout exception
PostPosted: Fri Aug 12, 2005 5:01 pm 
Regular
Regular

Joined: Wed Sep 10, 2003 2:26 pm
Posts: 56
Location: San Diego, CA
Hi,


Any ideas why I would sometimes get a "org.dom4j.DocumentException: Connection timed out: connect Nested exception: Connection timed out: connect"
exception (see below)?

And yes, I'm still using 2.0 DTDs with Hibernate 3. The first step of my upgrade roadmap is to run the current setup with HB3 without any modifications.

Thanks
Dmitry

Hibernate version:
3.0.6
Mapping documents:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">

<hibernate-mapping>
<class name="edu.ucsd.som.business.EmployeeSnapshot" table="som_employee_snapshot">
<id name="_id" column="som_employee_snapshot_id" type="long">
<generator class="native"/>
</id>
<property name="fullName" column="fullName" type="string" />
<property name="employeeId" column="ucsd_id" type="string"/>
<property name="snapshotDate" column="creation_date" type="timestamp"/>
<property name="annualRate" column="current_annual_rate" type="float"/>
<property name="hireDate" column="hire_date" type="date"/>
<property name="reclassDate" column="reclass_date" type="date"/>
<property name="bargainingUnit" column="bargaining_unit" type="string"/>
<property name="monthlyRate" column="current_monthly_rate" type="float"/>
<property name="rateType" column="rate_type" type="char"/>
<property name="grade" column="grade" type="string"/>
<property name="fte" column="perc_fte" type="float"/>

<many-to-one name="homeDepartment" column="home_dept_id" class="edu.ucsd.som.business.Department" />
<many-to-one name="title" column="title_id" class="edu.ucsd.som.business.PayrollTitle"/>
</class>
</hibernate-mapping>
Full stack trace of any exception that occurs:
Exception in thread "Thread-3" java.lang.RuntimeException: Could not init Hibernate session
at edu.ucsd.som.hibernate.AbstractHibernateDataStore.getFactory(AbstractHibernateDataStore.java:336)
at edu.ucsd.som.hibernate.AbstractHibernateDataStore.createSession(AbstractHibernateDataStore.java:125)
at edu.ucsd.som.hibernate.AbstractHibernateDataStore.startSession(AbstractHibernateDataStore.java:87)
at edu.ucsd.som.swing.app.SomApplicationDataStore$1.run(SomApplicationDataStore.java:80)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.hibernate.MappingException: Error reading resource: edu/ucsd/som/business/EmployeeSnapshot.hbm.xml
at org.hibernate.cfg.Configuration.addClass(Configuration.java:471)
at edu.ucsd.som.hibernate.AbstractHibernateDataStore.initFactory(AbstractHibernateDataStore.java:350)
at edu.ucsd.som.hibernate.AbstractHibernateDataStore.getFactory(AbstractHibernateDataStore.java:328)
... 4 more
Caused by: org.hibernate.MappingException: org.dom4j.DocumentException: Connection timed out: connect Nested exception: Connection timed out: connect
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:408)
at org.hibernate.cfg.Configuration.addClass(Configuration.java:468)
... 6 more
Caused by: org.dom4j.DocumentException: Connection timed out: connect Nested exception: Connection timed out: connect
at org.dom4j.io.SAXReader.read(SAXReader.java:484)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:398)
... 7 more


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 12, 2005 9:21 pm 
Regular
Regular

Joined: Wed Sep 10, 2003 2:26 pm
Posts: 56
Location: San Diego, CA
never mind. lol. I've been trying to figure this out for two days, and when I finally gave up and decided to post the question, it came to me a moment after I clicked the submit button: Hibernate3 jar doesn't have the 2.x DTD, so the parser is trying to download from the server.


It would be really nice if the next release of Hibernate would also include the 2.x DTD.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 12, 2005 9:28 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
So every application breaks completely and silently instead of forcing people to read the migration guide?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 12, 2005 9:28 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
You are not supposed to use the 2.x DTD in 3.0!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 12, 2005 9:42 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
I've added an ERROR log to the resolver to finally get rid of this problem...


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