1 Reply Latest reply on Aug 18, 2004 1:39 PM by treespace

    ParseException when creating CMP tables on 3.2.4RC2 and 4.0.

    Peter Backx Newbie

      I would like to experiment a with the xpetstore application and AOP so I tried to deploy it on both JBoss 3.2.4RC2 and 4.0.0DR4 but I get a parse exception that I did not encounter when deploying the exact same ear on 3.2.3:

      16:56:24,820 INFO [STDOUT] org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "Order" at line 1, column 23.
      Was expecting one of:
       "IN" ...
       <ABSTRACT_SCHEMA> ...
      


      and a little further the EQL is shown:

      16:56:24,931 ERROR [EntityContainer] Starting failed jboss.j2ee:jndiName=OrderItemLocal,service=EJB
      org.jboss.deployment.DeploymentException: Error compiling EJB-QL statement 'SELECT OBJECT(o) FROM Order AS o WHERE o.customer.userId = ?1'; - nested throwable: (org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "Order" at line 1, column 23.
      Was expecting one of:
       "IN" ...
       <ABSTRACT_SCHEMA> ...
       )
      


      I'm not sure if anything has changed on the CMP description, but I couldn't find any information on this.

      For those who are familiar with the xpetstore application: this error is thrown when creating the T_ORDER_ITEM table. The relevant passage in ejb-jar is (in the entity EJB definition of Order:
       <query>
       <query-method>
       <method-name>findByCustomer</method-name>
       <method-params>
       <method-param>java.lang.String</method-param>
       </method-params>
       </query-method>
       <ejb-ql>[CDATA[SELECT OBJECT(o) FROM Order AS o WHERE o.customer.userId = ?1]]</ejb-ql>
       </query>
      


      With my limited CMP and EJB-QL experience I'm sort of at loss here. Everything seems to be ok, so I hope some one can point me in the right direction.