5 Replies Latest reply on Jan 27, 2005 12:07 PM by Franco

    CMP Deployment fails on 'Standard' EJB-QL

    Matthew Robinson Newbie

      Hi There.

      I am trying to deploy a CMP Bean with a finder method (declared using XDoclet) which contains <= and >= operators. These operators are part of the standard EJB-QL specification (as far as I know) and yet JBOSS fails with:

      16:10:30,207 ERROR [EntityContainer] Starting failed jboss.j2ee:jndiName=ejb/fcau/datastore/Site,service=EJB
      org.jboss.deployment.DeploymentException: Error compiling EJB-QL statement 'SELECT OBJECT(a) FROM AccommodationSchema AS a WHERE a.publishedDate >= ?1 AND a.publishedDate <= ?2'; - nested throwable: (org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered ">=" at line 1, column 70.
      Was expecting one of:
      ">" ...
      "<" ...
      "=" ...
      "<>" ...
      )
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.<init>(JDBCEJBQLQuery.java:52)


      The ejb-jar.xml file contains:
      <query>
      <query-method>
      <method-name>findByPublishedDates</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(a) FROM AccommodationSchema AS a WHERE a.publishedDate >= ?1 AND a.publishedDate <= ?2]]></ejb-ql>
      </query>


      Can anyone help here? I need these operators!