1 Reply Latest reply on Apr 13, 2005 5:24 PM by lafr

    What is wrong with this xdoclet EQL finder tags??

    askesis

      What is wrong with this xdoclet EQL finder tags (which deploys OK without the wher clause):

      @ejb.finder
       signature = "nl.wifi4all.interfaces.ClientAntenna findByCustomer(java.lang.String customerObjectId)"
       query = "SELECT OBJECT(c) FROM ClientAntenna AS c WHERE c.customer=?1"
      


      ClientAntenna is the name of both the remote Bean interface and the abstract schema (and even database table). customer exists as a column and as CMP field.

      On deployment it gives exceptions:
      .....
      16:46:21,893 INFO [STDOUT] org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "1" at line 1, column 59.
      Was expecting one of:
      <IDENTIFICATION_VARIABLE> ...
      <ENTITY_VALUED_PARAMETER> ...
      <ENTITY_VALUED_PATH> ...

      and (a lot of lines) later:
      ...
      16:46:21,924 ERROR [EntityContainer] Starting failed jboss.j2ee:jndiName=ejb/Address,service=EJB
      org.jboss.deployment.DeploymentException: Error compiling EJB-QL statement 'SELECT OBJECT(c) from ClientAntenna AS c WHERE c.customer=?1'; - nested throwable: (org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "1" at line 1, column 59.
      Was expecting one of:
      <IDENTIFICATION_VARIABLE> ...
      <ENTITY_VALUED_PARAMETER> ...
      <ENTITY_VALUED_PATH> ...
      )

      The relevant ejb-jar.xml:
       <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(c) from ClientAntenna AS c WHERE c.customer=?1]]</ejb-ql>
       </query>