users@glassfish.java.net

problem with EJB-QL

From: <glassfish_at_javadesktop.org>
Date: Mon, 07 Jul 2008 06:57:10 PDT

Hi,

We are having issues with EJB-QL while migrating from weblogic to glassfish v2. Here are the queries that are causing the problem:

[#|2008-07-03T14:44:55.563-0500|WARNING|sun-appserver9.1|javax.enterprise.system.tools.deployment|_ThreadID=16;_ThreadName=Thread-29;_RequestID=56c54d81-a04b-4fbb-b10e-c66571958866;|JDO74025: JDOCodeGenerator: Caught an Exception validating CMP bean 'ProductCatalogView' in application 'omservices' module 'omservicesEJB': JDO75006: Invalid EJBQL query
Bean: ProductCatalogView
Method: java.util.Collection findProgramProductsInFamilyOrder(java.lang.String)
EJBQL: [i][b]SELECT OBJECT(pcv) FROM ProductCatalogView pcv WHERE pcv.productId IN (SELECT ppstg.productId FROM ProgramProductSTG ppstg WHERE ppstg.bpomPrgNbr = ?1) ORDER BY pcv.bpomProdFamCd[/b][/i]
Error: column(68): JDO75202: Syntax error unexpected token 'IN'.
|#]

[#|2008-07-03T14:44:56.173-0500|SEVERE|sun-appserver9.1|javax.enterprise.system.tools.deployment|_ThreadID=16;_ThreadName=Thread-29;_RequestID=56c54d81-a04b-4fbb-b10e-c66571958866;|Exception occured in J2EEC Phase
com.sun.enterprise.deployment.backend.IASDeploymentException: Fatal Error from EJB Compiler -- JDO74025: JDOCodeGenerator: Caught an Exception validating CMP bean 'ProgramView' in application 'omservices' module 'omservicesEJB': JDO75006: Invalid EJBQL query
Bean: ProgramView
Method: java.util.Collection findByCatalogId(java.lang.String)
EJBQL: [i][b]SELECT DISTINCT OBJECT(o) FROM ProgramView o WHERE o.bpomPrgCashvalue = ?1[/b][/i]
Error: column(71): JDO75311: Invalid argument(s) for '='.

Glassfish is complaining about the 'IN' keyword and '=' sign. Some of the queries that have an '=' sign go through the deployment without any errors like the following EJB-QL.
[i]
[b]SELECT DISTINCT OBJECT(o) FROM ProgramProductView o WHERE o.bpomOpPrc = ?1[/b][/i]

Please help me in fixing these errors.

Thanks
Suneel
[Message sent by forum member 'suneelgv' (suneelgv)]

http://forums.java.net/jive/thread.jspa?messageID=284688