I created a finder method trying to get the latest sessionId from mySQL.
SELECT DISTINCT object(u) FROM UsageSession u WHERE u.station = ?1 AND u.card = ?2 AND u.sessionId=(SELECT MAX(u2.sessionId) FROM UsageSession u2 WHERE u2.station = ?1 AND u2.card = ?2)
When I deploy it, I get the following Exception:
Caused by: org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "SELECT"
at line 1, column 101.
Was expecting one of:
"ABS" ...
"LENGTH" ...
"LOCATE" ...
"SQRT" ...
"MOD" ...
"(" ...
"+" ...
"-" ...
<INTEGER_LITERAL> ...
<FLOATING_POINT_LITERAL> ...
<NUMERIC_VALUED_PARAMETER> ...
<NUMERIC_VALUED_PATH> ...
How can I resolve this problem? Please help me.
Thanks in advance
Hey
Even I have got the same error and not able to resolve this
so ll you plzz help me out of this
i am deploying my code to jboss3.2.6
with jdk 1.4
Thnx in Advance
Sachin