Oracle Weblogic Server (MOSC)

MOSC Banner

EclipseLink-6121 - org.eclipse.persistence.exceptions.QueryException

edited Sep 28, 2012 9:09PM in Oracle Weblogic Server (MOSC) 5 commentsAnswered
  Hi all,
I'm working in a web app using Weblogic 12c with JPA (EclipseLink). 
When I try to use one JPA "Subquery" in a CriteriaQuery. I have an error that follows:

Exception [EclipseLink-6121] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.QueryException
Exception Description: The query has not been defined correctly, the expression builder is missing.  For sub and parallel queries ensure the queries builder is always on the left.

My code is:

CriteriaQuery<Message> query = cb.createQuery(Message.class); 
Root message = query.from(Message.class); 

 //Subquery 
Expression minExpression = cb.min(message.get("dateMessage"));
Subquery<Calendar> sub = query.subquery(Calendar.class); 

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center