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
|