0 Replies Latest reply on Apr 30, 2003 12:30 AM by bryandollery

    EJB-QL Deployment error

    bryandollery Newbie

      Hi guys,

      I'm trying to deploy a bean that contains this bit of EJB-QL:

      SELECT OBJECT(ce) FROM CourseEnrolment AS ce WHERE ce.teacher.primaryKey = ?1

      and I'm getting a deployment exception from jboss, telling me that the query can't be compiled. The error message starts with:

      org.jboss.deployment.DeploymentException: Error compiling EJB-QL statement 'SELECT OBJECT(ce) FROM CourseEnrolment AS ce WHERE ce.teacher.primaryKey = ?1'; - nested throwable: (org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "ce.teacher.primaryKey" at line 1, column 63.

      Was expecting one of:
      "NOT" ...
      "(" ...
      <COLLECTION_VALUED_PATH> ...
      <STRING_VALUED_PATH> ...
      "CONCAT" ...
      "SUBSTRING" ...
      <BOOLEAN_VALUED_PATH> ...
      <DATETIME_VALUED_PATH> ...
      <ENTITY_VALUED_PATH> ...
      <IDENTIFICATION_VARIABLE> ...
      <NUMERIC_VALUED_PATH> ...
      "LENGTH" ...
      "LOCATE" ...
      "ABS" ...
      "SQRT" ...
      "+" ...
      "-" ...
      <INTEGER_LITERAL> ...
      <FLOATING_POINT_LITERAL> ...
      <NUMERIC_VALUED_PARAMETER> ...
      )
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.(JDBCEJBQLQuery.java:46)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCCommandFactory.createEJBQLQuery(JDBCCommandFactory.java:53)

      Any help would be most welcome.

      Cheers,

      Bryan