2 Replies Latest reply on Jan 17, 2003 12:58 PM by Alex Shneyderman

    Error compiling ejbql

    Frintrop Newbie

      hi,
      i have written many cmp 2.0 ejb´s, but now i got some deployment exception and i don´t see why:

      + nested throwable:
      org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "1" at line 1, column 60.
      Was expecting one of:
      "ABS" ...
      "LENGTH" ...
      "LOCATE" ...
      "SQRT" ...
      "(" ...
      "+" ...
      "-" ...
      <INTEGER_LITERAL> ...
      <FLOATING_POINT_LITERAL> ...
      <NUMERIC_VALUED_PARAMETER> ...
      <NUMERIC_VALUED_PATH> ...


      my deployment descriptor:

      <!-- Entity Beans -->
      <entity >
      <description></description>
      <display-name>NegativAccount</display-name>
      <ejb-name>NegativAccount</ejb-name> <home>de......NegativAccountHome</home> <remote>de.....NegativAccount</remote>
      <local-home>de......NegativAccountLocalHome</local-home>
      <local>de.....NegativAccountLocal</local>

      <ejb-class>de.....NegativAccountBean</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>de......NegativAccountPK</prim-key-class>
      <reentrant>False</reentrant>
      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>NegativAccount</abstract-schema-name>
      <cmp-field >
      <description><![CDATA[]]></description>
      <field-name>iD</field-name>
      </cmp-field>
      <cmp-field >
      <description><![CDATA[]]></description>
      <field-name>state</field-name>
      </cmp-field>
      <cmp-field >
      <description><![CDATA[]]></description>
      <field-name>bankID</field-name>
      </cmp-field>
      <cmp-field >
      <description><![CDATA[]]></description>
      <field-name>accountID</field-name>
      </cmp-field>

      <security-role-ref>
      <role-name>admin</role-name>
      <role-link>Administrator</role-link>
      </security-role-ref>

      <query>
      <query-method>
      <method-name>findByAccountIDAndBankID</method-name>
      <method-params>
      <method-param>java.lang.String</method-param>
      <method-param>java.lang.String</method-param>
      </method-params>
      </query-method>
      <ejb-ql><![CDATA[SELECT OBJECT(n) FROM NegativAccount n WHERE n.accountID = ?1 AND n.bankID = ?2 ]]></ejb-ql>
      </query>
      </entity>