I am having a problem getting jboss-ql to work with a LIKE parameter clause. Using JBoss 3.0.4 with XDoclet 1.2beta1 and i mark up my jboss-ql tag as follows:
* @ejb.finder signature="Collection findByRoom(java.lang.Integer roomId)" * unchecked="true" * query="" * @jboss.query signature="Collection findByRoom(java.lang.Integer roomId)" * strategy="on-load" * query="SELECT OBJECT(o) FROM Function AS f, IN (f.rooms) AS o WHERE (o.roomId LIKE CONCAT(?1,'%')) ORDER BY o.roomId" Which produces this in the jbosscmp-jdbc.xml: <query> <query-method> <method-name>findByRoom</method-name> <method-params> <method-param>java.lang.Integer</method-param> </method-params> </query-method> <jboss-ql><![CDATA[SELECT OBJECT(o) FROM Function AS f, IN (f.rooms) AS o WHERE (o.roomId LIKE CONCAT(?1,'%')) ORDER BY o.roomId]]></jboss-ql> <read-ahead> <strategy>on-load</strategy> </read-ahead> </query> I have tried different variations of the query such as removing the CONCAT, having a query in ejb.finder etc but to no avail. When the ql is parsed during deployment i get the following: 12:05:12,611 WARN [ServiceController] Problem starting service jboss.j2ee:jndiName=TeamLocalHome,service=EJB org.jboss.deployment.DeploymentException: Error compiling ejbql; - nested throwable: (org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "LIKE" at line 1, column 72. Was expecting one of: ")" ... "+" ... "-" ... "*" ... "/" ... "NOT" ... "IN" ... "=" ... ">" ... ">=" ... "<" ... "<=" ... "<>" ... "BETWEEN" ... ) at org.jboss.ejb.plugins.cmp.jdbc.JDBCJBossQLQuery.<init>(JDBCJBossQLQuery.java :46) at org.jboss.ejb.plugins.cmp.jdbc.JDBCCommandFactory.createJBossQLQuery(JDBCCom mandFactory.java:54) at org.jboss.ejb.plugins.cmp.jdbc.JDBCQueryManager.start(JDBCQueryManager.java: 203) at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.startStoreManager(JDBCStoreM anager.java:463) at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java: 369) at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java :198) at org.jboss.ejb.EntityContainer.start(EntityContainer.java:376) at org.jboss.ejb.Container.invoke(Container.java:756) at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1058) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517) at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.jav a:978) at $Proxy5.start(Unknown Source) at org.jboss.system.ServiceController.start(ServiceController.java:398) at java.lang.reflect.Method.invoke(Native Method) ..... Is there something that i am missing or is there a known problem that i don't know about ? Many thanks in advance, Paul Any e-mail message from the European Central Bank (ECB) is sent in good faith but shall neither be binding nor construed as constituting a commitment by the ECB except where provided for in a written agreement. This e-mail is intended only for the use of the recipient(s) named above. Any unauthorised disclosure, use or dissemination, either in whole or in part, is prohibited. If you have received this e-mail in error, please notify the sender immediately via e-mail and delete this e-mail from your system. ------------------------------------------------------- This SF.NET email is sponsored by: The Best Geek Holiday Gifts! Time is running out! Thinkgeek.com has the coolest gifts for your favorite geek. Let your fingers do the typing. Visit Now. T H I N K G E E K . C O M http://www.thinkgeek.com/sf/ _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
