0 Replies Latest reply on Feb 16, 2006 5:30 AM by mshelat

    Subquery problem in EJB-QL for JBoss 4.0.3

    mshelat

      Hi,

      Currently I am facing a problem in writing a subquery in ejb-ql in Jboss4.0.3. By providing 2 params (Integer & Timestamp) my query looks something like this:

      SELECT OBJECT(tb1)
      FROM table1 tb1
      WHERE tb1.integer_data = ?1 and
      tb1.timestamp_data =
      (SELECT min(tb2.timestamp_data)
      FROM table2 tb2
      WHERE tb2.integer_data = ?1 and
      tb2.timestamp_data > ?2 )

      The Exception that I am getting is:

      org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "(" at Line 1, column 109
      Was expecting one of:
      <DATETIME_VALUE_PARAMETER> ....

      Note: I have changed the <suquery-supported> flag to true, in standardjboss.xml. And I am also getting the same error with Jboss 4.0.4.

      The same query written in ejb-jar.xml works fine in Weblogic 8.1.

      Kindly let me know if anyone has the answer to this.

      Thanks & Regards,
      Mihir.