Hello again,
I tried the query by putting it in as a finder in the ejb jar xml an extract from the ejb jar file is below:
<query>
<query-method>
<method-name>findStoresInStoreGroups</method-name>
<method-params>
<method-param>java.lang.Integer</method-param>
<method-param>java.lang.Integer</method-param>
</method-params>
</query-method>
<ejb-ql>
SELECT OBJECT(locn) FROM LocationEntity AS locn, IN(locn.StoreGroupMemberEntity) AS group WHERE group.locationIdGroup = ?1 AND group.locationTypeIdGroup = ?2
</ejb-ql>
</query>
and i got the following error when running ejbc? any ideas?
[
java] [EJBCompiler] : Compliance Checker said bean was compliant
[java] ERROR: Error from ejbc: Error while reading 'META-INF/weblogic-cmp-rdbms-jar.xml'. The error was:
[java]
[java] weblogic.ejb20.cmp.rdbms.finders.IllegalExpressionException:
[java] While trying to process Query
[java] Method Name: findStoresInStoreGroups
[java] Parameter Types: (java.lang.Integer, java.lang.Integer)
[java] EJB Query: SELECT OBJECT(locn) FROM LocationEntity AS locn, IN(locn.StoreGroupMemberEntity) AS group WHERE group.locationIdGroup = ?1 AND group.locationTypeIdGroup = ?2
[java] )
[java] Could not parse EJB QL expression: SELECT OBJECT(locn) FROM LocationEntity AS locn, IN(locn.StoreGroupMemberEntity) AS group WHERE group.locationIdGroup = ?1 AND group.locationTypeIdGroup = ?2
[java] weblogic.ejb20.ejbc.EJBCException: line 1: unexpected token: WHERE
[java] Error in FROM clause, there may be a problem with the FROM Clause.
[java] Check that the Range Variable Declarations and the Collection Member Declarations are correct
[java] and that no EJB QL keywords are being used as:
[java] Range Variable names,
[java] Collection Member names,
[java] Abstract Schema names,