users@glassfish.java.net

Toplink exception parsing query

From: Shevland, Joe <joe.shevland_at_capgemini.com>
Date: Wed, 1 Aug 2007 16:25:22 +1000

I can't work this out, or I've been struck down with EJBQL blindness -
what is wrong with:

  @Entity()
  @Table(...)
  @NamedQuery(
     name = "SystemPrivilege.findOperatorPrivilegesOrderById",
     query = "SELECT syspriv FROM SystemPrivilege syspriv"
  )
  public class SystemPrivilege { ... }

I see this exception:

Caused by: Exception [TOPLINK-8025] (Oracle TopLink Essentials - 2.0
(Build b50-beta3 (06/06/2007))):
oracle.toplink.essentials.exceptions.EJBQLException
Exception Description: Syntax error parsing the query
[SystemPrivilege.findOperatorPrivilegesOrderById], line 1, column 1:
unexpected token [SystemPrivilege].
Internal Exception: line 1:1: unexpected token: SystemPrivilege

I'd previously had a series of joins in the query, but I've stripped it
back to basics, undeployed/restarted GF/redeployed app, and I still get
the above exception. Even changed the classname thinking 'Privilege'
might be a reserved word in some way.

Cheers
Joe

This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.