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

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3872974#3872974

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3872974


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to