3 Replies Latest reply on Sep 27, 2002 3:09 PM by alexb

    Error in EjbQl

    alexb

      Hello,
      I'm using jboss 3.0.2 and mssql7.

      The problem that i'm having is that when I use a < or a > operator in jboss-ql my bean dosn't deploy. This is an example of my jbosscmp-jdbc.xml file.

      (jbosscmp-jdbc.xml)

      <query-method>
      <method-name>findAlternatesOf</method-name>
      <method-params>
      <method-param>java.lang.Integer</method-param>
      <method-param>java.math.BigDecimal</method-param>
      <method-param>java.lang.Integer</method-param>
      </method-params>
      </query-method>
      <jboss-ql><![CDATA[
      SELECT OBJECT(o)
      FROM BidItem o
      WHERE o.bidIdNo = ?1
      AND o.bidItemNo > ?2
      AND o.companyNo = ?3
      ]]></jboss-ql>


      Example of my ejb-jar.xml for this finder
      (ejb-jar.xml)

      <query-method>
      <method-name>findAlternatesOf</method-name>
      <method-params>
      <method-param>java.lang.Integer</method-param>
      <method-param>java.math.BigDecimal</method-param>
      <method-param>java.lang.Integer</method-param>
      </method-params>
      </query-method>
      <ejb-ql/>


      I also have the docs for jboss 2.0 CMP there example looks like this

      <query-method>
      <method-name>findBadDudes_jbossql</method-name>
      <method-params>
      <method-param>int</method-param>
      </method-params>
      </query-method>
      <jboss-ql><![CDATA[
      SELECT OBJECT(g)
      FROM gangster g
      WHERE g.badness > ?1
      ORDER BY g.badness DESC
      ]]></jboss-ql>

      this is close to my example but I'm using a bigDecmial
      thanks for any help.
      Alex

        • 1. Re: Error in EjbQl
          dsundstrom

          Numbers in EJB-QL only support the range of a long, so BigDecimal is not supported. It is planed for EJB-QL, but I never got around to adding it. I suggest you post a feature request if you really want this feature.

          • 2. Re: Error in EjbQl
            alexb

            I'm using jboss-ql and I thought that BigDecimal was supported in jboss-ql that you for the response to my first question.

            • 3. Re: Error in EjbQl
              alexb

              I still having the same error in the jbosscmp-jdbc.xml file.
              This is the error message

              org.jboss.deployment.DeploymentException: Error compiling ejbql; - nested throwable: (org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "o.bidItemNo <" at line 4, column 17.

              My jbosscmp-jdbc.xml file is already posted so i won't post it again, does anyone have any suggestions to what the problem may be. This finder works in weblogic using ejb-ql.
              thanks for any help
              Alex