1 Reply Latest reply on Feb 27, 2006 6:13 AM by douda-g

    Problem in EJB QL Finder Method.....

    tiwari_p_k

      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

        • 1. Re: Problem in EJB QL Finder Method.....
          douda-g

          I have the same problem when trying to use current_date, using the same configuration ejb 2.0 jboss 4.0.3RC1. I know that current_date is defined in the EJB 3.0 specification. Is there any possible way to use EJB 3.0 with xdoclets??

          Thank you
          John