-->
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.  [ 1 post ] 
Author Message
 Post subject: Connection Time out error while parsing hbm file
PostPosted: Wed Oct 16, 2013 3:02 pm 
Newbie

Joined: Wed Oct 16, 2013 2:53 pm
Posts: 2
I am facing this weird issue while opening hbm file. I am using hibernate3.jar. I also verified that there is only one hibernate3.jar in classpath and it contains hibernate mapping dtd file.
Code:
DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
docFactory.setValidating(false);
DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
return docBuilder.parse(filePath);

Exception:
[java] Caused by: java.net.ConnectException: Connection timed out: connect
[java] at java.net.PlainSocketImpl.socketConnect(Native Method)
[java] at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
[java] at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
[java] at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
[java] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
[java] at java.net.Socket.connect(Socket.java:529)
[java] at java.net.Socket.connect(Socket.java:478)
[java] at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
[java] at sun.net.www.http.HttpClient.openServer(HttpClient.java:388)
[java] at sun.net.www.http.HttpClient.openServer(HttpClient.java:523)
[java] at sun.net.www.http.HttpClient.<init>(HttpClient.java:227)
[java] at sun.net.www.http.HttpClient.New(HttpClient.java:300)
[java] at sun.net.www.http.HttpClient.New(HttpClient.java:317)
[java] at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:970)
[java] at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:911)
[java] at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:836)
[java] at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1172)
[java] at java.net.URL.openStream(URL.java:1010)
[java] at org.apache.xerces.readers.DefaultReaderFactory.createReader(DefaultReaderFactory.java:149)
[java] at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromExternalEntity(DefaultEntityHandler.java:772)
[java] at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromExternalSubset(DefaultEntityHandler.java:571)
[java] at org.apache.xerces.framework.XMLDTDScanner.scanDoctypeDecl(XMLDTDScanner.java:1139)
[java] at org.apache.xerces.framework.XMLDocumentScanner.scanDoctypeDecl(XMLDocumentScanner.java:2145)
[java] at org.apache.xerces.framework.XMLDocumentScanner.access$0(XMLDocumentScanner.java:2100)
[java] at org.apache.xerces.framework.XMLDocumentScanner$PrologDispatcher.dispatch(XMLDocumentScanner.java:831)
[java] at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
[java] at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098)
[java] at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:195)
[java] at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:180)



I also tried by specifying docBuilder.setEntityResolver(new DTDEntityResolver());
Any pointers will be appreciated.

Thanks,
Leo


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

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.