The database is in place and the application is already running on JBoss 3.0.0. I am trying to port the application to OC4J. Is it possible without a change in code?
Neelu Mehta wrote: > Try to use Timestamp or String class.. > > Neelu > > -----Original Message----- > From: Girish R [SMTP:[EMAIL PROTECTED]] > Sent: Thursday, September 19, 2002 3:35 PM > To: [EMAIL PROTECTED] > Subject: OC4J: Error parsing EJB QL > > 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". > > =========================================================================== > 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". =========================================================================== 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".
