Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Attempting to retry query (EclipseLink-4002)
Attempting to retry query [message #904528] Tue, 28 August 2012 12:01 Go to previous message
Igor B is currently offline Igor B
Messages: 9
Registered: July 2012
Junior Member
Hi,

I found a strange behaviour with EclipseLink as soon as I get a DatabaseException while I use a value which is too long for the database: The Exception is:

<28.08.2012 17:42 Uhr MESZ> <Notice> <EclipseLink> <BEA-2005000> <2012-08-28 17:42:43.886--UnitOfWork(32101512)--Communication failure detected when attempting to perform read query outside of a transaction. Attempting to retry query. Error was: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.0.v20120608-r11652): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: com.ibm.db2.jcc.am.co: DB2 SQL Error: SQLCODE=-302, SQLSTATE=22001, SQLERRMC=null, DRIVER=3.57.82
Error Code: -302

The funny thing is, that EclipseLink try to retry the query but always reports the same error, this happens around 7 times until it returns the control to the program. The side effect is that this spends a lot of time (~10s).

The code looks like this:

Query _query = aEm.createNamedQuery("findCodeSystemWert");
_query.setParameter("systemNr", getSystemNr());
_query.setParameter("sprache", getSprachCode);
_query.setParameter("codeWert1Int", getCodeWert1Int());
_query.setParameter("codeWert1An", getCodeWert1An()); // value is more than CHAR(10)
_query.setParameter("datum", getSuchDatum());

//Here happens the retry automatically!!!
CodeWert1 _result = (CodeWert1)_query.getSingleResult();


The Code runs within a Stateless Session Bean on Weblogic Server and uses the following persistence.xml

<?xml version="1.0" encoding="UTF-8"?>
<persistence>
<persistence-unit name="service.codesystem" transaction-type="JTA">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<jta-data-source>db2_txds</jta-data-source>
<class>CodeSystem</class>
<class>CodeSystemDefinition</class>
<class>CodeWert1</class>
<class>CodeWert2</class>
<class>CodeWert3</class>
<class>CodeWert4</class>
<shared-cache-mode>NONE</shared-cache-mode>
</persistence-unit>
</persistence>


How I can change the behaviour, so that EclipseLink does not make any retry?

best regards,

Igor
  • Attachment: log.txt
    (Size: 7.28KB, Downloaded 52 times)

[Updated on: Tue, 28 August 2012 12:01]

Report message to a moderator

 
Read Message
Read Message
Read Message
Previous Topic:preventing on jpa exception setRollbackOnly
Next Topic:Retrieve server generated value
Goto Forum:
  


Current Time: Tue May 21 13:24:37 EDT 2013

Powered by FUDForum. Page generated in 0.02037 seconds