My Oracle Support Banner

PessimisticLockException generated By EclipseLink Embedded in WebLogic 12.1.3 (Doc ID 2185517.1)

Last updated on JUNE 01, 2018

Applies to:

Oracle TopLink - Version 12.1.3.0.0 and later
Information in this document applies to any platform.
***Checked for relevance on 1-June-2018***

Symptoms

Using EclipseLink on Weblogic 12.1.3 version with Oracle Database and MySQL DB, it generates the Wrong SQL and throws the following exception


javax.persistence.PessimisticLockException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd):org.eclipse.persistence.exceptions.DatabaseException

Internal Exception: java.sql.SQLSyntaxErrorException: ORA-00907: missing right parenthesis Error Code: 907 Call: SELECT * FROM (SELECT a.*, ROWNUM rnum FROM (SELECT N_ID AS a1, C_DESCRIPTION AS a2, version AS a3, C_SUMMARY AS a4 FROM MY_ENTITY_TABLE WHERE (C_SUMMARY = ?) FOR UPDATE) a WHERE ROWNUM <= ?) WHERE rnum > ? bind => [3 parameters bound]

Query:ReadAllQuery(name="query.MyEntity.findMyEntityBySummary" referenceClass=MyEntity sql="SELECT * FROM (SELECT a.*, ROWNUM rnum FROM (SELECT N_ID AS a1, C_DESCRIPTION AS a2, version AS a3, C_SUMMARY AS a4 FROM MY_ENTITY_TABLE WHERE (C_SUMMARY = ?) FOR UPDATE) a WHERE ROWNUM <= ?) WHERE rnum > ?")

 

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.