Use this

                        <cmp-field>

<field-name>createdDate</field-name>

<column-name>CREATED_DATE</column-name>
                                        <jdbc-type>TIMESTAMP</jdbc-type>
                                        <sql-type>DATE</sql-type>
                                </cmp-field>

-----Original Message-----
From: A mailing list for Enterprise JavaBeans development
[mailto:[EMAIL PROTECTED]] On Behalf Of Neelu Mehta
Sent: Friday, September 20, 2002 6:10 PM
To: [EMAIL PROTECTED]
Subject: Re: OC4J: Error parsing EJB QL


Ya..
But I'm using timestamp in Java.. while in SQL its data field

Neelu



-----Original Message-----
From:   Girish R [SMTP:[EMAIL PROTECTED]]
Sent:   Friday, September 20, 2002 12:15 PM
To:     [EMAIL PROTECTED]
Subject:        Re: OC4J: Error parsing EJB QL

Okay, let me re-phrase my question. Does OC4J support java.sql.Date /
java.util.Date CMP fields? Somebody out there having experience in OC4J,
please reply

Saroj Kumar wrote:

> Hey Maan,
>
> Always there will be some code change. It is bound to happen as all
App.
> Servers are having their own features
> Which may not be supported by other servers.
>
> -Saroj
>
> -----Original Message-----
> From: A mailing list for Enterprise JavaBeans development
> [mailto:[EMAIL PROTECTED]] On Behalf Of Girish R
> Sent: Friday, September 20, 2002 9:17 AM
> To: [EMAIL PROTECTED]
> Subject: Re: OC4J: Error parsing EJB QL
>
> 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(j
> ava.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".
>
>
------------------------------------------------------------------------
>                                Name: InterScan_Disclaimer.txt
>    InterScan_Disclaimer.txt    Type: Plain Text (text/plain)
>                            Encoding: 7bit

========================================================================
===
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".

**************************Disclaimer**************************************************

 Information contained in this E-MAIL being proprietary to Wipro Limited is 
'privileged'
and 'confidential' and intended for use only by the individual or entity to which it is
addressed. You are notified that any use, copying or dissemination of the information
contained in the E-MAIL in any manner whatsoever is strictly prohibited.

****************************************************************************************



Reply via email to