1 Reply Latest reply on Jan 26, 2003 7:15 AM by juhalindfors

    EJB-QL supported type in JBoss 3.0.4

    nadia

      Hi,

      I have an ejb-ql problem !

      Here is my request :


      <query-method>
      <method-name>
      findMessage
      </method-name>
      <method-params>
      <method-param>java.math.BigDecimal</method-param>
      <method-param>java.lang.String</method-param>
      </method-params>
      </query-method>
      <ejb-ql>
      SELECT OBJECT(o)
      FROM CurrentMessage AS o
      WHERE o.nombre = ?1 AND o.strId = ?3
      </ejb-ql>

      And I've got :

      Error compiling ejbql; - nested throwable: (org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "o.nombre" at line 3, column 41.
      Was expecting one of:
      "NOT" ...
      "(" ...
      <COLLECTION_VALUED_PATH> ...
      <STRING_VALUED_PATH> ...
      "CONCAT" ...
      "SUBSTRING" ...
      <BOOLEAN_VALUED_PATH> ...
      <DATETIME_VALUED_PATH> ...
      <ENTITY_VALUED_PATH> ...
      <IDENTIFICATION_VARIABLE> ...
      <NUMERIC_VALUED_PATH> ...
      "LENGTH" ...
      "LOCATE" ...
      "ABS" ...
      "SQRT" ...
      "+" ...
      "-" ...
      <INTEGER_LITERAL> ...
      <FLOATING_POINT_LITERAL> ...
      <NUMERIC_VALUED_PARAMETER> ...
      )


      When I only put :
      <ejb-ql>
      SELECT OBJECT(o)
      FROM CurrentMessage AS o
      WHERE o.strId = ?3
      </ejb-ql>

      That runs.
      I think that it comes from the decimal type that seems to not be supported by JBoss 3.0.4.

      I've read that some types are not supported. Can someone tell me whitch types are supported ?

      More over, I've read that there was also a JBoss-QL. Does anyone know something about it ?

      Thanks a lot for your help

      Nadia

        • 1. Re: EJB-QL supported type in JBoss 3.0.4

          Hmm, unless I'm misreading your descriptors, you only declare two parameters in your query declaration (BigDecimal and String) but in the EJBQL try to use a third parameter (?3).

          So what's up with that?

          JBOSSQL is the JBoss extension to EJBQL (allows for additional SQL functions to be used, more flexibility in parameter usage). You can find the details in Dain's CMP documentation.