3 Replies Latest reply on Aug 10, 2006 12:22 PM by Ohad Raz

    ParseException : expecting one of <DATETIME_VALUED_PARAMETER

    catherine lo Newbie

      I am using JBoss 4.0.1sp1 with xDoclet.
      I defined the following finder statement in UsageSession Entity Bean where timeStarted is DATETIME in mySQL, and I need to get the latest timeStarted from database (mySQL):

      * @ejb.finder view-type="local" description="findSessionByStationAndCard"
      * signature="com.abc.interfaces.UsageSessionLocal findSessionByStationAndCard(com.abc.interfaces.StationLocal station, com.abc.interfaces.CardLocal card)"
      * query="SELECT distinct object(u) FROM UsageSession u WHERE u.station = ?1 AND u.card = ?2 AND u.timeStarted=(SELECT MAX(u2.timeStarted) FROM UsageSession u2 WHERE u2.station=?1 AND u2.card=?2)"

      But when I deploy it, I got such exception :
      INFO [STDOUT] org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "(
      " at line 1, column 102.
      Was expecting one of:

      How can I resolve this problem?

      Thanks in advance.