Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Eclipselink not reconnecting to database, after database-server downtime(INFO: Communication failure detected when attempting to perform read query outside of a transaction. Attempting to retry query.)
Eclipselink not reconnecting to database, after database-server downtime [message #1046711] Mon, 22 April 2013 05:04 Go to next message
Reiner Lott is currently offline Reiner Lott
Messages: 7
Registered: April 2013
Junior Member
Hello all !

It's my goal, to achieve a jpa provider change in our development team...

We're actually using openjpa with dbcp, but eclipselink seems more mainstream and performs even better in a j2se application (lazy loading with exclusive read connection is really a neat feature) Wink

But there is a big problem:

If the db-server has shutdown (at night) and a java se client has not closed his program, eclipe link does not reconnect itself to our db2 server.

I tried to find something about this behaviour (not recconecting to database) in google, but there are only poor postings with no solutions in the www.

Also using the customizer (session) with optional parameter settings "connectionPool.setCheckConnections();" did not help (see attached files).

Dear EclipseLink Team: Is this a bug? OpenJpa with dbcp does a reconnect to our db (validationQuery=SELECT 1 FROM TEST, TestOnBorrow=true, removeAbandoned=true)!

@EveryoneElse: Similar problems? What would be the solution?

-EclipseLink - 2.1.0.v20100614-r7608

Thanks a lot!
-Reiner



[EL Fine]: 2013-04-22 10:55:23.095--Connection(8713574)--SELECT NEUBAU, MANDANT, BEZEICHNUNG, ATTRIBUT2, ATTRIBUT1, LASTUPDATE FROM Y_TEST WHERE ((NEUBAU = ?) AND (MANDANT = ?))
	bind => [638, 100]
[EL Fine]: 2013-04-22 10:55:23.095--SELECT 1 FROM TEST
[EL Info]: 2013-04-22 10:55:23.095--Communication failure detected when attempting to perform read query outside of a transaction. Attempting to retry query.
[EL Fine]: 2013-04-22 10:55:23.095--Connection(8713574)--SELECT NEUBAU, MANDANT, BEZEICHNUNG, ATTRIBUT2, ATTRIBUT1, LASTUPDATE FROM Y_TEST WHERE ((NEUBAU = ?) AND (MANDANT = ?))
	bind => [638, 100]
[EL Fine]: 2013-04-22 10:55:23.095--SELECT 1 FROM TEST
[EL Info]: 2013-04-22 10:55:23.095--Communication failure detected when attempting to perform read query outside of a transaction. Attempting to retry query.
[EL Fine]: 2013-04-22 10:55:28.123--Connection(8713574)--SELECT NEUBAU, MANDANT, BEZEICHNUNG, ATTRIBUT2, ATTRIBUT1, LASTUPDATE FROM Y_TEST WHERE ((NEUBAU = ?) AND (MANDANT = ?))
	bind => [638, 100]
[EL Fine]: 2013-04-22 10:55:28.123--SELECT 1 FROM TEST
[EL Info]: 2013-04-22 10:55:28.123--Communication failure detected when attempting to perform read query outside of a transaction. Attempting to retry query.
[EL Fine]: 2013-04-22 10:55:33.119--Connection(8713574)--SELECT NEUBAU, MANDANT, BEZEICHNUNG, ATTRIBUT2, ATTRIBUT1, LASTUPDATE FROM Y_TEST WHERE ((NEUBAU = ?) AND (MANDANT = ?))
	bind => [638, 100]
[EL Fine]: 2013-04-22 10:55:33.119--SELECT 1 FROM TEST
[EL Info]: 2013-04-22 10:55:33.119--Communication failure detected when attempting to perform read query outside of a transaction. Attempting to retry query.
[EL Fine]: 2013-04-22 10:55:38.131--Connection(8713574)--SELECT NEUBAU, MANDANT, BEZEICHNUNG, ATTRIBUT2, ATTRIBUT1, LASTUPDATE FROM Y_TEST WHERE ((NEUBAU = ?) AND (MANDANT = ?))
	bind => [638, 100]
[EL Fine]: 2013-04-22 10:55:38.131--SELECT 1 FROM TEST
[EL Info]: 2013-04-22 10:55:38.131--Communication failure detected when attempting to perform read query outside of a transaction. Attempting to retry query.
[EL Warning]: 2013-04-22 10:55:38.131--Local Exception Stack: 
Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.1.0.v20100614-r7608): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: The connection does not exist.
Error Code: -99999
Call: SELECT NEUBAU, MANDANT, BEZEICHNUNG, ATTRIBUT2, ATTRIBUT1, LASTUPDATE FROM Y_TEST WHERE ((NEUBAU = ?) AND (MANDANT = ?))
	bind => [638, 100]
Query: ReadObjectQuery(referenceClass=Z_Test sql="SELECT NEUBAU, MANDANT, BEZEICHNUNG, ATTRIBUT2, ATTRIBUT1, LASTUPDATE FROM Y_TEST WHERE ((NEUBAU = ?) AND (MANDANT = ?))")
	at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:333)
	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.processExceptionForCommError(DatabaseAccessor.java:1419)
	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:675)
	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:526)
	at org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:529)
	at org.eclipse.persistence.internal.sessions.IsolatedClientSession.executeCall(IsolatedClientSession.java:133)
	at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:206)
	at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:192)
	at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectOneRow(DatasourceCallQueryMechanism.java:664)
	at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectOneRowFromTable(ExpressionQueryMechanism.java:2582)
	at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectOneRow(ExpressionQueryMechanism.java:2553)
	at org.eclipse.persistence.queries.ReadObjectQuery.executeObjectLevelReadQuery(ReadObjectQuery.java:439)
	at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1074)
	at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:736)
	at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1034)
	at org.eclipse.persistence.queries.ReadObjectQuery.execute(ReadObjectQuery.java:407)
	at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1112)
	at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2909)
	at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1291)
	at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1364)
	at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1364)
	at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1364)
	at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1364)
	at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1273)
	at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1233)
	at org.eclipse.persistence.internal.jpa.EntityManagerImpl.executeQuery(EntityManagerImpl.java:759)
	at org.eclipse.persistence.internal.jpa.EntityManagerImpl.findInternal(EntityManagerImpl.java:703)
	at org.eclipse.persistence.internal.jpa.EntityManagerImpl.find(EntityManagerImpl.java:597)
	at org.eclipse.persistence.internal.jpa.EntityManagerImpl.find(EntityManagerImpl.java:476)
	at test.eclipseLink.TestJPA.jlm_read_SingleRow(TestJPA.java:166)
	at test.eclipseLink.TestJPA.initialize(TestJPA.java:80)
	at test.eclipseLink.TestJPA.main(TestJPA.java:44)
Caused by: java.sql.SQLException: The connection does not exist.
	at com.ibm.as400.access.JDError.throwSQLException(JDError.java:408)
	at com.ibm.as400.access.AS400JDBCConnection.checkOpen(AS400JDBCConnection.java:460)
	at com.ibm.as400.access.AS400JDBCConnection.prepareStatement(AS400JDBCConnection.java:2154)
	at com.ibm.as400.access.AS400JDBCConnection.prepareStatement(AS400JDBCConnection.java:1965)
	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.prepareStatement(DatabaseAccessor.java:1401)
	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.prepareStatement(DatabaseAccessor.java:1350)
	at org.eclipse.persistence.internal.databaseaccess.DatabaseCall.prepareStatement(DatabaseCall.java:652)
	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:576)
	... 29 more




[Updated on: Mon, 22 April 2013 14:36]

Report message to a moderator

Re: Eclipselink not reconnecting to database, after database-server downtime [message #1047063 is a reply to message #1046711] Mon, 22 April 2013 14:37 Go to previous message
Reiner Lott is currently offline Reiner Lott
Messages: 7
Registered: April 2013
Junior Member
Hi...

with the newest release (2.4.1) this problem doesn't exist anymore!

Sorry for that,
Greetings

- Reiner
Previous Topic:EclipseLink NoSQL support, limitations and future plans?
Next Topic:EclipseLink composite persistence unit class declaration
Goto Forum:
  


Current Time: Thu Aug 28 01:22:51 EDT 2014

Powered by FUDForum. Page generated in 0.16613 seconds