Hello Allan, try to include the whole query into CDATA.
alex Tuesday, June 24, 2003, 2:50:29 PM, Allan Kamau wrote: AK> I am trying to write join queries in ejb-ql. AK> This is my situation. I have three CMP entry beans, AK> two of these entity beans are have a many to many AK> relationship, so I created an the third ejb. This new AK> ejb is also a parent of some other ejb. AK> I would like to retrive a Collection or Set of this AK> third ejb from it's home interface depending on some AK> criteria that is dependent on one of the first two AK> (parent) EJBs. AK> I tried each of these ejb-ql statements but I get AK> deployment errors. AK> <ejb-ql> AK> select object(prs) from AK> ProjectReportingScheduleTimingAlertEJB prs join AK> ProjectReportingScheduleTimingEJB on AK> prs.projectReportingScheduleTimingCode=ProjectReportingScheduleTimingEJB.projectReportingScheduleTimingCode AK> where ProjectReportingScheduleTimingEJB.timing > AK> <![CDATA[]]>?1<![CDATA[]]> and AK> prs.hasSuccessfullyAlerted!=true AK> </ejb-ql> AK> I have even tried rewriting the query AK> <ejb-ql> AK> select object(prs2) from AK> ProjectReportingScheduleTimingAlertEJB prs2 where AK> prs2.hasSuccessfullyAlerted <![CDATA[<>]> 'true' and AK> prs2.projectReportingScheduleTimingCode in (select AK> projectReportingScheduleTimingCode from AK> ProjectReportingScheduleTimingEJB where AK> ProjectReportingScheduleTimingEJB.timing AK> <![CDATA[>]]>?1) AK> </ejb-ql> AK> During deployment I get the error: AK> 2003-06-24 14:55:21,405 WARN AK> [org.jboss.system.ServiceController] Problem starting AK> service AK> jboss.j2ee:jndiName=ProjectReportingScheduleEJB,service=EJB AK> org.jboss.deployment.DeploymentException: Error AK> compiling ejbql; - nested throwable: AK> (org.jboss.ejb.plugins.cmp.ejbql.TokenMgrError: AK> Lexical error at line 1, column 106. Encountered: "]" AK> (93), after : "") AK> at AK> org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.<init>(JDBCEJBQLQuery.java:46) AK> at AK> org.jboss.ejb.plugins.cmp.jdbc.JDBCCommandFactory.createEJBQLQuery(JDBCCommandFactory.java:44) AK> at AK> org.jboss.ejb.plugins.cmp.jdbc.JDBCQueryManager.start(JDBCQueryManager.java:218) AK> Thank you. AK> Allan AK> __________________________________ AK> Do you Yahoo!? AK> SBC Yahoo! DSL - Now only $29.95 per month! AK> http://sbc.yahoo.com ------------------------------------------------------- This SF.Net email is sponsored by: INetU Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user