Lost « Connection « JPA Q&A





1. Resetting Connections when Lost?    forum.hibernate.org

Hi, I'm hoping someone can help me here! We are using Hibernate with SQL Server, and one of our clients is experiencing situations where every once in a while the connection cannot be opened (we get a SQLException for "Exception:Cannot open connection"). It looks like this is an issue with their network, and they can't seem to resolve it. We are ...

2. Database connection lost    forum.hibernate.org

We have Tomcat 4.1, Oracle 9, Hibernate2.0.1 for an application. However, we found the application is dead after the Oracle 9 got restarted or after a few days. Does hibernate have the ability to reconnect to the database in such situation ? Hibernate version: 2.0.1 hibernate properties flie: hibernate.connection.username=APP hibernate.connection.password=123Test hibernate.connection.url=jdbc:oracle:thin:@testserver.indygov.org:1521:ORAT9 hibernate.connection.driver_class=oracle.jdbc.driver.OracleDriver hibernate.dialect=net.sf.hibernate.dialect.Oracle9Dialect hibernate.transaction.factory_class=net.sf.hibernate.transaction.JDBCTransactionFactory c3p0.initialPoolSize=3 c3p0.minPoolSize=3 c3p0.maxPoolSize=30 c3p0.maxIdleTime=100 c3p0.maxStatements=0 c3p0.acquireIncrement=1 Stack ...

3. Weblogic pool connection lost, cant get new connections    forum.hibernate.org

Hi, I hope anyone can help, this is my problem Im using Struts - Hibernate with Oracle and Weblogic....everything works fine until I lost the pool connection (I can down the pool from weblogic console with 'Force Suspend' and then 'Resume') so, after do that, hibernate can't do anything with the database, i get this error : "Could not execute query", ...

4. WebSphere db2 datasource gets lost    forum.hibernate.org

Caused by: net.sf.hibernate.HibernateException: Could not find datasource: jdbc/DATASOURCENAME at net.sf.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:59) at net.sf.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:76 ) at net.sf.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:161) at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:613) at dataAccess.base.Connection.createSessionFactory(Connection.java:77) ...

5. [lost connection]    forum.hibernate.org

Hibernate version: 3 Code between sessionFactory.openSession() and session.close(): _RootDAO.initialize(); Session session = HibernateUtil.getSessionFactory().getCurrentSession(); Transaction tx = session.beginTransaction(); try { ... listResult = session.createSQLQuery(requete).list(); Iterator iterRes = listResult.iterator(); ... while (iterRes.hasNext()) { ... tx.commit(); session.close(); } catch (HibernateException e) { tx.rollback(); session.close(); e.printStackTrace(); } Full stack trace of any exception that occurs: 2006-07-10 11:31:05 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: 08003 2006-07-10 ...

6. Lost Connection in MySQL    forum.hibernate.org

Hello guys, I have a problem in mysql with hibernate. I guess mysql automatically kills open connections after there are not used for a given time. Since my singleton session factory cannot re-open the connection, all my queries fail. I faced this problem both in mysql 4.1 and mysql 5.0 here is the exception, Communications link failure due to underlying exception: ...