1 Reply Latest reply on Feb 27, 2006 6:13 AM by Doudalis Ioannis

    Problem in EJB QL Finder Method.....

    Prashant Tiwari Newbie

      Hi,
      I am developing an application based on EJB CMP2.0 Spec. I have a CMP BEAN with finder method as follows:-
      =================================================================
      SELECT Object(b) FROM CartMaster as b where b.customerid = ?1 and b.status='active' and b.cartdate < CURRENT_TIMESTAMP(0)-interval '48 hours'
      =================================================================

      I am using JBOSS4.0.3. But when I amdeploying bean over Server it gives me error like:-
      ====================================================================
      11:16:23,156 INFO [STDOUT] org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "CURRENT_TIMESTAMP" at line 1, column 102.
      Was expecting one of:
      <DATETIME_VALUED_PARAMETER> ...
      <DATETIME_VALUED_PATH> ...
      ====================================================================

      What is wrong in above Query? How to correct it?

      Please help me.

      Thanx,
      Prash