0 Replies Latest reply on Jan 3, 2007 11:10 AM by polygon

    Error compiling EJB-QL statement '' .... org.jboss.ejb.plugi

    polygon

      Hi all,

      Im getting this error from Jboss:

      org.jboss.deployment.DeploymentException: Error compiling EJB-QL statement ''; - nested throwable: (org.jboss.ejb.plugins.cmp.ejbql.ParseException: FROM not found)

      I know its to do with having or not having empty ql sections, but i am not sure of the exact rules. There were no problems when running the app on an older version of Jboss (3.x)

      Here is a section from the jbosscmp-jdbc.xml file.


      ...
      <enterprise-beans>

      <ejb-name>ContactEJB</ejb-name>
      <table-name>con</table-name>
      <cmp-field>
      <field-name>contactId</field-name>
      <column-name>CONTACT_ID</column-name>
      <not-null/>
      </cmp-field>
      .....
      ....


      <query-method>
      <method-name>ejbSelectBoss_declaredsql</method-name>
      <method-params>
      <method-param>java.lang.String</method-param>
      </method-params>
      </query-method>
      <declared-sql>
      < select>

      <ejb-name>ContactEJB</ejb-name>
      boss

      <![CDATA[, contacts c]]>
      <![CDATA[ LCASE(c.email) = {0} ]]>
      </declared-sql>



      <query-method>
      <method-name>ejbSelectGeneric</method-name>
      <method-params>
      <method-param>java.lang.String</meth
      od-param>
      <method-param>java.lang.Object[]</me
      thod-param>
      </method-params>
      </query-method>
      <dynamic-ql/>



      <query-method>
      <method-name>findAll_onfind</method-name>
      <method-params/>
      </query-method>
      <jboss-ql><![CDATA[
      SELECT OBJECT(g)
      FROM contact g
      ORDER BY g.contactId
      ]]></jboss-ql>
      <read-ahead>
      on-find
      <page-size>4</page-size>
      <eager-load-group>most</eager-load-group>
      </read-ahead>


      <query-method>
      <method-name>findAll_onload</method-name>
      <method-params/>
      </query-method>
      <jboss-ql><![CDATA[
      SELECT OBJECT(g)
      FROM contact g
      ORDER BY g.contactId
      ]]></jboss-ql>
      <read-ahead>
      on-load
      <page-size>4</page-size>
      <eager-load-group>basic</eager-load-group>
      </read-ahead>


      <query-method>
      <method-name>findAll_none</method-name>
      <method-params/>
      </query-method>
      <jboss-ql><![CDATA[
      SELECT OBJECT(g)
      FROM contact g
      ORDER BY g.contactId
      ]]></jboss-ql>
      <read-ahead>
      on-find
      </read-ahead>


      <query-method>
      <method-name>findFour</method-name>
      <method-params/>
      </query-method>
      <jboss-ql><![CDATA[
      SELECT OBJECT(g)
      FROM contact g
      WHERE g.contactId < 4
      ORDER BY g.contactId
      ]]></jboss-ql>
      <read-ahead>
      on-find
      <page-size>1000</page-size>
      <eager-load-group>basic</eager-load-group>
      </read-ahead>





      Any help on what i need to do to correct this would be greately appreciated.

      Thanks
      Chris