Hi,

I'm using JBoss-4.0.2 and I am having a problem deploying a CMP bean with the 
following finder:
 * @ejb.finder
  |  *     query="SELECT OBJECT(a) FROM news AS a ORDER BY a.articleId DESC 
LIMIT 5"
  |  *     signature="java.util.Collection findRecent()" 
This seems to generate the correct XML in ejb-jar.xml
         <query>
  |             <query-method>
  |                <method-name>findRecent</method-name>
  |                <method-params>
  |                </method-params>
  |             </query-method>
  |             <ejb-ql>[CDATA[SELECT OBJECT(a) FROM news AS a ORDER BY 
a.articleId DESC LIMIT 5]]</ejb-ql>
  |          </query>
But when I deploy this I get
21:57:18,935 WARN  [ServiceController] Problem starting service 
jboss.j2ee:jndiName=ejb/remote/News,service=EJB
  | org.jboss.deployment.DeploymentException: Error compiling EJB-QL statement 
'SELECT OBJECT(a) FROM news AS a ORDER BY a.articleId DESC LIMIT 5'; - nested 
throwable: (org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "LIMIT" 
at line 1, column 59.
  | 
I am right in thinking that LIMIT is now part of EJB-QL, aren't I?

What am I doing wrong?

TIA
Chris.

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

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


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to