-->
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: Connection timout problems with Schema Export
PostPosted: Thu May 06, 2004 11:14 pm 
Newbie

Joined: Thu May 06, 2004 11:08 pm
Posts: 3
Location: Australia
When I execute the command:

SchemaExport --properties=C:\products\hibernate-2.1\src\hibernate.properties camping\model\Site.hbm.xml

and camping\model\Site.hbm.xml contains the following:

<?xml version="1.0"?>

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

<hibernate-mapping>
<class
name="au.com.objectconsulting.camping.model.Site"
table="site"
>

<id
name="id"
column="id"
type="java.lang.Long"
>
<generator class="native">
</generator>
</id>
</class>

<!-- other mappings omitted for brevity -->

</hibernate-mapping>


I get this:

7/05/2004 12:04:43 net.sf.hibernate.cfg.Environment <clinit>
INFO: Hibernate 2.1.2
7/05/2004 12:04:43 net.sf.hibernate.cfg.Environment <clinit>
INFO: loaded properties from resource hibernate.properties: {hibernate.connection.driver_class=com.mysql.jdbc.Driver, hibernate.cglib.use_reflection_o
ptimizer=true, hibernate.cache.provider_class=net.sf.hibernate.cache.HashtableCacheProvider, hibernate.cache.use_query_cache=true, hibernate.max_fetch
_depth=1, hibernate.dialect=net.sf.hibernate.dialect.MySQLDialect, hibernate.jdbc.use_streams_for_binary=true, hibernate.jdbc.batch_size=0, hibernate.
query.substitutions=true 1, false 0, yes 'Y', no 'N', hibernate.proxool.pool_alias=pool1, hibernate.connection.username=root, hibernate.connection.url
=jdbc:mysql:///test, hibernate.show_sql=true, hibernate.connection.password=, hibernate.connection.pool_size=1}
7/05/2004 12:04:43 net.sf.hibernate.cfg.Environment <clinit>
INFO: using java.io streams to persist binary types
7/05/2004 12:04:43 net.sf.hibernate.cfg.Environment <clinit>
INFO: using CGLIB reflection optimizer
7/05/2004 12:04:43 net.sf.hibernate.cfg.Configuration addFile
INFO: Mapping file: C:\products\eclipse\workspace\CampingWeb\src\au\com\objectconsulting\camping\model\Site.hbm.xml
7/05/2004 12:05:06 net.sf.hibernate.cfg.Configuration addFile
SEVERE: Could not configure datastore from file: C:\products\eclipse\workspace\CampingWeb\src\au\com\objectconsulting\camping\model\Site.hbm.xml
org.dom4j.DocumentException: Connection timed out: connect Nested exception: Connection timed out: connect
at org.dom4j.io.SAXReader.read(SAXReader.java:358)
at org.dom4j.io.SAXReader.read(SAXReader.java:219)
at net.sf.hibernate.cfg.Configuration.addFile(Configuration.java:169)
at net.sf.hibernate.tool.hbm2ddl.SchemaExport.main(SchemaExport.java:289)
Nested exception:
java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.URL.openStream(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown Source)
at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.dom4j.io.SAXReader.read(SAXReader.java:339)
at org.dom4j.io.SAXReader.read(SAXReader.java:219)
at net.sf.hibernate.cfg.Configuration.addFile(Configuration.java:169)
at net.sf.hibernate.tool.hbm2ddl.SchemaExport.main(SchemaExport.java:289)
7/05/2004 12:05:07 net.sf.hibernate.tool.hbm2ddl.SchemaExport main
SEVERE: Error creating schema
net.sf.hibernate.MappingException: org.dom4j.DocumentException: Connection timed out: connect Nested exception: Connection timed out: connect
at net.sf.hibernate.cfg.Configuration.addFile(Configuration.java:176)
at net.sf.hibernate.tool.hbm2ddl.SchemaExport.main(SchemaExport.java:289)
Caused by: org.dom4j.DocumentException: Connection timed out: connect Nested exception: Connection timed out: connect
at org.dom4j.io.SAXReader.read(SAXReader.java:358)
at org.dom4j.io.SAXReader.read(SAXReader.java:219)
at net.sf.hibernate.cfg.Configuration.addFile(Configuration.java:169)
... 1 more
net.sf.hibernate.MappingException: org.dom4j.DocumentException: Connection timed out: connect Nested exception: Connection timed out: connect
at net.sf.hibernate.cfg.Configuration.addFile(Configuration.java:176)
at net.sf.hibernate.tool.hbm2ddl.SchemaExport.main(SchemaExport.java:289)
Caused by: org.dom4j.DocumentException: Connection timed out: connect Nested exception: Connection timed out: connect
at org.dom4j.io.SAXReader.read(SAXReader.java:358)
at org.dom4j.io.SAXReader.read(SAXReader.java:219)
at net.sf.hibernate.cfg.Configuration.addFile(Configuration.java:169)
... 1 more


Yet, if I substitute 2.0 for 1.1 in the dtd name (ie. http://hibernate.sourceforge.net/hibern ... ng-2.0.dtd) I get errors just around the dtd contents not matching, ie

...
SEVERE: Could not configure datastore from file: C:\products\eclipse\workspace\CampingWeb\src\au\com\objectconsulting\camping\model\Site.hbm.xml
net.sf.hibernate.MappingException: invalid mapping
at net.sf.hibernate.cfg.Configuration.addFile(Configuration.java:170)
at net.sf.hibernate.tool.hbm2ddl.SchemaExport.main(SchemaExport.java:289)
Caused by: org.xml.sax.SAXParseException: Attribute "name" is required and must be specified for element type "set".
...

However, both the dtds seems to be valid and come up in a browser as expected. Copying the DTD locally and specifiying as SYSTEM also works.

So, What is the problem? I am behind a proxy but just using the 2.0 version seems to work.

Thanks
Peter Miller
[code][/code]


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 07, 2004 2:32 am 
Newbie

Joined: Thu May 06, 2004 11:08 pm
Posts: 3
Location: Australia
Problem solved: I needed to specify the proxy setting in Java properties, by adding this to the Java command:

-Dhttp.proxyHost=proxy -Dhttp.proxyPort=8001

I still don't know why it could find the 2.0 dtd but not the 1.1 version!

Pete


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.