My Oracle Support Banner

EclipseLink Issue In WLS 12c JPQL Query Compilation Issue: "The state field path 'registry.<COLUMN6>;' cannot be resolved to a valid type" (Doc ID 2062194.1)

Last updated on MARCH 16, 2021

Applies to:

Oracle TopLink - Version 12.1.3.0.0 to 12.1.3.0.0 [Release 12c]
Information in this document applies to any platform.

Symptoms

Disclaimer: In the images and/or the document content below, the user information and data used represents fictitious data. Any similarity to actual data, persons, living or dead, is purely coincidental and not intended in any manner.

 

After migrating an EclipseLink application from TopLink 10.3.6 to TopLink 12.1.3, the following exceptions were seen:

an exception occurred while executing method
javax.persistence.PersistenceException: Exception [EclipseLink-28013] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Unable to deploy PersistenceUnit [ServiceProcessorUP] in invalid state [DeployFailed].
Internal Exception: javax.persistence.PersistenceException: Exception [EclipseLink-28019] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Deployment of PersistenceUnit [ServiceProcessorUP] failed. Close all factories for this PersistenceUnit.
Internal Exception: Exception [EclipseLink-0] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.JPQLException
Exception Description: Problem compiling [SELECT registry FROM <TABLE1> AS registry WHERE registry.<COLUMN1> = :<BIND_VAR1> AND registry.<COLUMN2> = FALSE AND ( registry.<COLUMN3> =:<BIND_VAR2> OR registry.<COLUMN3> =:<BIND_VAR3>) ORDER BY registry.<COLUMN4>, registry.<COLUMN5>, registry.<COLUMN6>;].
[224, 236] The state field path 'registry.<COLUMN6>;' cannot be resolved to a valid type.

The same code was running without issues on TopLink 10.3.6 (EclipseLink 2.3.1).

The field is in the ServiceRegistry entity class is defined like this:
  @<COLUMN6>
  @SequenceGenerator(name = "mySequence", sequenceName = "SEQ_ID", initialValue = 1, allocationSize = 50)
  @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "mySequence")
  @Column(name = "N_ID")
  protected Long id;

Exception stack


Caused by: Exception [EclipseLink-0] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.JPQLException
Exception Description: Problem compiling [SELECT registry FROM <TABLE1> AS registry WHERE registry.<COLUMN1> = :<BIND_VAR1> AND registry.<COLUMN2> = FALSE AND ( registry.<COLUMN3> =:<BIND_VAR2> OR registry.<COLUMN3> =:<BIND_VAR3>) ORDER BY registry.<COLUMN4>, registry.<COLUMN5>, registry.<COLUMN6>;].
[224, 236] The state field path 'registry.<COLUMN6>;' cannot be resolved to a valid type.
at org.eclipse.persistence.internal.jpa.jpql.HermesParser.buildException(HermesParser.java:155)
at org.eclipse.persistence.internal.jpa.jpql.HermesParser.validate(HermesParser.java:347)
at org.eclipse.persistence.internal.jpa.jpql.HermesParser.populateQueryImp(HermesParser.java:278)
at org.eclipse.persistence.internal.jpa.jpql.HermesParser.buildQuery(HermesParser.java:163)
at org.eclipse.persistence.internal.jpa.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:142)
at org.eclipse.persistence.internal.jpa.JPAQuery.processJPQLQuery(JPAQuery.java:221)
at org.eclipse.persistence.internal.jpa.JPAQuery.prepare(JPAQuery.java:182)
at org.eclipse.persistence.queries.DatabaseQuery.prepareInternal(DatabaseQuery.java:621)
at org.eclipse.persistence.internal.sessions.AbstractSession.processJPAQuery(AbstractSession.java:4309)
at org.eclipse.persistence.internal.sessions.AbstractSession.processJPAQueries(AbstractSession.java:4270)
at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:579)
at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:799)
at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:756)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:241)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:685)
... 148 more



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!


In this Document
Symptoms
Changes
Cause
Solution


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