Hi,
I have a CMP field 'fromDate' of type java.sql.Date in an entity bean.
I am using OC4J 9.0.3 developer preview. I have some finder methods
which queries the database using this date. Query description for a
finder method is:

        <query>
          <description />
          <query-method>
            <method-name>findByEmpIdStatusAndDate</method-name>
            <method-params>
              <method-param>java.lang.String</method-param>
              <method-param>java.lang.String</method-param>
              <method-param>java.sql.Date</method-param>
            </method-params>
          </query-method>
          <ejb-ql><![CDATA[Select Object(o) from Leave o where
o.fkEmployeeId = ?1 and o.approvalStatusNyd = ?2 and o.fromDate >
?3]]></ejb-ql>
        </query>

While deploying the bean, the server throws an error while parsing the
EJB QL:

Error compiling ~/oc4j/j2ee/home/pdf/pdf_ejb.jar: Error translating
EJBQL: Invalid type for expression (o.fromDate  > ?3)
EJB QL statement : 'Select Object(o) from Leave o where o.fkEmployeeId =
?1 and o.approvalStatusNyd = ?2 and o.fromDate > ?3'
EJB QL method    : public abstract java.util.Collection
com.siptech.pdf.ejb.leave.LeaveTakenLocalHome.findByEmpIdStatusAndDate(java.lang.String,java.lang.String,java.sql.Date)
throws javax.ejb.FinderException

The error occurs in all finder methods where I am using the 'fromDate'
in the EJB QL. There is no error in parsing the QL if 'fromDate' is
removed from the query. The bean works fine in JBoss 3.0.0.

Can anyone please tell me why this is happening? Does OC4J support
java.sql.Date CMP fields?

TIA,
Girish

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to