Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000095 [Resin] minor always 04-12-05 00:00 11-30-05 14:43
Reporter sam View Status public  
Assigned To
Priority urgent Resolution fixed  
Status closed   Product Version 3.0.12
Summary 0000095: EJB query with access more than two references deep
Description RSN-86
(rep by A Barton)

We are porting an application from Resin-ee.2.1.x to Resin-pro-3.0.12. We
have discovered a problem in 3.0.12 that had been working fine in 2.1.x. Our
problem seems to be related to the depth of reference in our queries. Our
entity definition includes the following query:

            <ejb-ql><![CDATA[SELECT o FROM Faq o order by
o.faqCategory.categoryName, o.intOrder]]></ejb-ql>

We wrote a simple JSP to exercise the problem finder:

    fooblox.faq.FaqHome home =

Here is the stacktrace:

    at com.caucho.amber.query.ColumnExpr.generateWhere(
    at com.caucho.amber.query.SelectQuery.init(
    at com.caucho.amber.query.QueryParser.parseSelect(
    at com.caucho.amber.query.QueryParser.parse(
    at _ejb.FaqBean.FaqBean__EJB$LocalHome.findAll(

Here is a code snippet from the resin generated source:
        query = trans.getAmberConnection().prepareQuery("SELECT o FROM
Faq o ORDER BY o.faqCategory.categoryName, o.intOrder");
        com.caucho.amber.query.ResultSetImpl rs =
(com.caucho.amber.query.ResultSetImpl) query.executeQuery();
        java.util.ArrayList list = new java.util.ArrayList();
        while ( {
          com.caucho.ejb.entity.EntityObject item =
(com.caucho.ejb.entity.EntityObject) rs.getObject(1);

If we remove the ?o.faqCategory.categoryName? reference from the order by
clause, this finder will return successfully. Our problem seems to be
related to accessing relationships in queries more than two levels deep. We
are experiencing this same problem with ejbSelect methods as well.

Additional Information Resin-pro 3.0.12
Attached Files

- Relationships

- Notes
04-12-05 00:00

This does not qualify as a "critical" issue.
04-12-05 00:00


- Issue History
Date Modified Username Field Change
04-12-05 00:00 sam New Issue
11-30-05 00:00 administrator Fixed in Version  => 3.0.15
11-30-05 14:43 ferg Status resolved => closed

Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
30 total queries executed.
28 unique queries executed.
Powered by Mantis Bugtracker