-->
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: Hibernate problem with Oracle
PostPosted: Sat Jul 17, 2010 6:34 am 
Newbie

Joined: Sat Jul 17, 2010 6:25 am
Posts: 1
Hello,
I am using Hibernate in an SWT application that connects to an Oracle 11g database
The database exists on the same machine that hosts the application
When i run the jar the application starts and connects successfully to the database
BUT
When I unplug the cable from the machine, a problem happens,
Hibernate can't connect to the database (Although it exists on localhost)
and the console stops much time on this line
INFO: connection properties: {user=off_reserve, password=****}
and finally an exception is raised
WARNING: Could not obtain connection metadata
java.sql.SQLException: Socket read timed out
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:412)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:531)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:221)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:503)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:154)
at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:84)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915)
at dl.DAO.HibernateUtil.<clinit>(HibernateUtil.java:11)
at dl.DAO.BaseDAO.queryDb(BaseDAO.java:47)
at config.Config.readConfig(Config.java:30)
at view.adminstration.ENROffline.main(ENROffline.java:29)
Caused by: oracle.net.ns.NetException: Socket read timed out
at oracle.net.ns.Packet.receive(Packet.java:320)
at oracle.net.ns.NSProtocol.connect(NSProtocol.java:286)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1042)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:301)
... 15 more


Could anyone provide me with a solution for this problem ??

Thanks


Top
 Profile  
 
 Post subject: Re: Hibernate problem with Oracle
PostPosted: Mon Jul 19, 2010 9:42 am 
Senior
Senior

Joined: Tue Oct 28, 2008 10:39 am
Posts: 196
Did you use 127.0.0.1 or localhost in your config or did you use the "remote" IP?


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.