[WLS12c] JPQL Initialization Constructor Doesn't Support CONCAT
(Doc ID 2435930.1)
Last updated on MARCH 01, 2019
Applies to:
Oracle TopLink - Version 12.2.1.2.0 and laterInformation in this document applies to any platform.
Symptoms
On WebLogic Server version 12.2.1.2 and 12.2.1.3.
while creating a query like with JPA application
SELECT NEW model.ReturnType(a.id, a.name, CONCAT(a.name, a.id)) FROM EntityA a
throws the following exception:
Exception Description: An Exception was thrown while executing a ReportQuery with a constructor expression: java.lang.NoSuchMethodException: model.ReturnType.(java.lang.String, java.lang.String, java.lang.Boolean)
Internal Exception: java.lang.NoSuchMethodException: model.ReturnType.(java.lang.String, java.lang.String, java.lang.Boolean)
Query: ReportQuery(name="MyClassConcat" referenceClass=EntityA jpql="
SELECT NEW model.ReturnType(a.id, a.name, CONCAT(a.name, a.id)) FROM EntityA a
")
at org.eclipse.persistence.internal.jpa.QueryImpl.getDatabaseQueryInternal(QueryImpl.java:344)
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.createNamedQuery(EntityManagerImpl.java:1135)
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.createNamedQuery(EntityManagerImpl.java:1155)
The return type for CONCAT should be String, not Boolean.
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 |
Cause |
Solution |
References |