Discussion:
Help: [6.1 to 8.1] Query returning CMR field
(too old to reply)
Hari -
2004-09-26 16:02:04 UTC
Permalink
Dear All,

I have explained a scenario below which is perfectly working in Weblogic 6.1. I'm currently in the process of migrating the application to 8.1, where I get EJBC compilation error.

Error:
EJB QL compilation encountered error: [EJB:013001]Finder: 'findApplicableProducts', the SELECT clause for a finder must return an EJB of a type equal to
the EJB for which the finder is written. Expected EJB: 'ProductsEJB' but instead found: 'VendorEJB'.


I have two EJBs Vendor and Product where Vendor has one to many relations with Product. I get a collection of Product (CMR) for a particular Vendor Bean by name "Products".

I wrote the query as (in Product EJB)
SELECT v.products FROM Vendor v WHERE v.identifier = ?1

I had used the Vendor abstract name to get a list of products. In Weblogic 6.1, this was working perfect, since the return type is a collection of Product Beans and also that I wrote the query in Product EJB.

But I get compilation errors in Weblogic 8.1.

If any of you have similar problem and any one can give me a solution, my thanks to you.

Thanks & Regards,
Hari.
thorick chow
2004-09-27 05:22:12 UTC
Permalink
Hi,

This is a known bug with 8.1. To get around it, would it be possible to try writing the query as an 'ejbSelect' instead of a 'find'. I believe that this should work (but you should try it).

-thorick
Hari -
2004-09-27 09:09:20 UTC
Permalink
Hi Thorick,

Thanks for the response. I'll give a try to ejbSelect.

Thanks & Regards,
Hari.
Steve Aguirre
2005-01-24 18:20:49 UTC
Permalink
I am experiencing this same issue with Weblogic 8.1. Are there any other alternatives or updates since this issue was reported. I would like to use a finder method instead of an ejbselect.

Steve Aguirre

Loading...