This discussion is archived
3 Replies Latest reply: Sep 25, 2012 5:35 AM by 964025 RSS

JPA Error using UPPER

964025 Newbie
Currently Being Moderated
Hello,

we are currently migrating from WebLogic 10 with Hibernate to WebLogic11 (10.3.6) with TopLink.

The following Statement runs fine with Hibernate, but with TopLink i cant get it to work.

Statement:
SELECT t FROM Tan t WHERE UPPER(t.surname) = UPPER(?) AND UPPER(t.name) = UPPER(?) AND t.parcelId IS NOT NULL

Stacktrace:
line 1:52 mismatched character ')' expecting set '1'..'9'
line 1:81 mismatched character ')' expecting set '1'..'9'
<24.09.2012 18:26 Uhr MESZ> <Info> <EJB> <BEA-010227> <EJB Exception occurred during invocation from home or business: weblogic.ejb.container.internal.StatelessEJBLocalHomeImpl@5386647 threw exception: java.lang.IllegalArgumentException: An exception occurred while creating a query in EntityManager:
Exception Description: Syntax error parsing the query [SELECT t FROM Tan t WHERE UPPER(t.surname) = UPPER(?) AND UPPER(t.name) = UPPER(?) AND t.parcelId IS NOT NULL], line 1, column 54: unexpected token [AND].
Internal Exception: NoViableAltException(6@[849:1: scalarExpression returns [Object node] : (n= simpleArithmeticExpression | n= nonArithmeticScalarExpression );])>

Thanks for your help
Axel

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points