You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by "D. Strauss" <ge...@ds-2.de> on 2006/07/07 23:10:08 UTC
ejbQL with relations
Hello, ejbQL profs ^^
seems that I missunderstood my ejbQL knowledge. I setup some ejbs and
wanted to create some finder methods (ejb-jar.xml). Unfortunately,
Geronimo (or OpenEJB?) ends in an exception that I can't figure out what
it wants to tell me.
Caused by: org.tranql.ql.QueryException: Finder [Finder
method=[findAll]; EJB-QL=[select distinct object(r) from Rasse as r, in
(r.partei) as p order by p.parteiName asc,r.rassenName asc]]
at
org.tranql.sql.EJBQLToPhysicalQuery.buildFinder(EJBQLToPhysicalQuery.java:143)
at
org.tranql.sql.EJBQLToPhysicalQuery.buildFinders(EJBQLToPhysicalQuery.java:90)
... 36 more
Caused by: org.tranql.ql.QueryException: Parser, lexer or Tree-walker
exception
at
org.tranql.sql.EJBQLToPhysicalQuery.getEJBQLQuery(EJBQLToPhysicalQuery.java:235)
at
org.tranql.sql.EJBQLToPhysicalQuery.buildFinder(EJBQLToPhysicalQuery.java:130)
... 37 more
Caused by: org.tranql.ql.MalformedNodeException: Path used must end with
a multi valued CMR field
at org.tranql.ql.DerivedTable.getEntityType(DerivedTable.java:61)
at org.tranql.ql.DerivedTable.<init>(DerivedTable.java:36)
at
org.tranql.ejb.parser.EJBQL21Compiler.collection_member_declaration(EJBQL21Compiler.java:473)
at
org.tranql.ejb.parser.EJBQL21Compiler.from_clause(EJBQL21Compiler.java:201)
at
org.tranql.ejb.parser.EJBQL21Compiler.ejbql(EJBQL21Compiler.java:115)
at
org.tranql.sql.EJBQLToPhysicalQuery.getEJBQLQuery(EJBQLToPhysicalQuery.java:233)
... 38 more
So, basically, the ejbQL
select distinct object(r) from Rasse as r, in (r.partei) as p order by
p.parteiName asc,r.rassenName asc
is wrong. However, the ejbQL
select distinct object(r) from Rasse as r order by r.rassenName asc
works.
Does anyone know what "Path used must end with a multi valued CMR field"
mean?
Or is this somehow related to the prefetch system by Geronimo?
Best regards
Dirk
Re: ejbQL with relations
Posted by "D. Strauss" <ge...@ds-2.de>.
Hello,
after some more hours of debugging here some new info about the problem:
Seems that only finder methods are affected. The ejbQL
select distinct object(r) from Rasse as r order by r.rassenName asc
becomes
SELECT R.name, T0.name FROM voelkertab R LEFT JOIN parteientab T0 ON
(T0.name = R.refseite) WHERE R.name = ?
I tried this SQL statement with my MySQL server and it works ;) so no
problem from the database.
XD5 generates the following openejb-jar stuff:
...
<entity>
<ejb-name>Partei</ejb-name>
<local-jndi-name>ejb/wowdb/Partei</local-jndi-name>
<table-name>parteientab</table-name>
<cmp-field-mapping>
<cmp-field-name>parteiName</cmp-field-name>
<table-column>name</table-column>
</cmp-field-mapping>
<primkey-field>parteiName</primkey-field>
<prefetch-group>
<group>
<group-name>Default</group-name>
<cmp-field-name>parteiName</cmp-field-name>
</group>
<group>
<group-name>All</group-name>
<cmp-field-name>parteiName</cmp-field-name>
</group>
<entity-group-mapping>
<group-name>All</group-name>
</entity-group-mapping>
</prefetch-group>
<query>
<query-method>
<method-name>findAll</method-name>
<method-params />
</query-method>
<group-name>All</group-name>
</query>
</entity>
<entity>
<ejb-name>Rasse</ejb-name>
<local-jndi-name>ejb/wowdb/Rasse</local-jndi-name>
<table-name>voelkertab</table-name>
<cmp-field-mapping>
<cmp-field-name>rassenName</cmp-field-name>
<table-column>name</table-column>
</cmp-field-mapping>
<primkey-field>rassenName</primkey-field>
<prefetch-group>
<group>
<group-name>Default</group-name>
<cmp-field-name>rassenName</cmp-field-name>
</group>
<group>
<group-name>All</group-name>
<cmp-field-name>rassenName</cmp-field-name>
<cmr-field> <cmr-field-name>partei</cmr-field-name>
<group-name>All</group-name>
</cmr-field>
</group>
<entity-group-mapping>
<group-name>All</group-name>
</entity-group-mapping>
</prefetch-group>
<query>
<query-method>
<method-name>findAll</method-name>
<method-params />
</query-method>
<group-name>All</group-name>
</query>
</entity>
...
This will end in:
[SQLQueryBuilder] CMP [Entity logical name=[Rasse]; physical
name=[Rasse]] - entity load command compiled to [PrefetchQueryCommand
[JDBCQueryCommand sql=[SELECT R.name, T0.name FROM voelkertab R LEFT
JOIN parteientab T0 ON (T0.name = R.refseite) WHERE R.name = ?]]]
Deployer operation failed: Unable to initialize EJB named 'Rasse': null
org.apache.geronimo.common.DeploymentException: Unable to initialize EJB
named 'Rasse': null
at
org.openejb.deployment.CMPEntityBuilder.createBean(CMPEntityBuilder.java:208)
at
org.openejb.deployment.CMPEntityBuilder.buildBeans(CMPEntityBuilder.java:120)
at
org.openejb.deployment.OpenEJBModuleBuilder.addGBeans(OpenEJBModuleBuilder.java:525)
at
org.openejb.deployment.OpenEJBModuleBuilder$$FastClassByCGLIB$$11bd7b20.invoke(<generated>)
at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
at
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:122)
at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:817)
at
org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
I'll now try to exchange the group-name. Maybe that makes Geronimo load
my ear :/
D. Strauss schrieb:
> Hello, ejbQL profs ^^
>
> seems that I missunderstood my ejbQL knowledge. I setup some ejbs and
> wanted to create some finder methods (ejb-jar.xml). Unfortunately,
> Geronimo (or OpenEJB?) ends in an exception that I can't figure out what
> it wants to tell me.
>
>
>
> Caused by: org.tranql.ql.QueryException: Finder [Finder
> method=[findAll]; EJB-QL=[select distinct object(r) from Rasse as r, in
> (r.partei) as p order by p.parteiName asc,r.rassenName asc]]
> at
> org.tranql.sql.EJBQLToPhysicalQuery.buildFinder(EJBQLToPhysicalQuery.java:143)
> at
> org.tranql.sql.EJBQLToPhysicalQuery.buildFinders(EJBQLToPhysicalQuery.java:90)
> ... 36 more
> Caused by: org.tranql.ql.QueryException: Parser, lexer or Tree-walker
> exception
> at
> org.tranql.sql.EJBQLToPhysicalQuery.getEJBQLQuery(EJBQLToPhysicalQuery.java:235)
> at
> org.tranql.sql.EJBQLToPhysicalQuery.buildFinder(EJBQLToPhysicalQuery.java:130)
> ... 37 more
> Caused by: org.tranql.ql.MalformedNodeException: Path used must end with
> a multi valued CMR field
> at org.tranql.ql.DerivedTable.getEntityType(DerivedTable.java:61)
> at org.tranql.ql.DerivedTable.<init>(DerivedTable.java:36)
> at
> org.tranql.ejb.parser.EJBQL21Compiler.collection_member_declaration(EJBQL21Compiler.java:473)
> at
> org.tranql.ejb.parser.EJBQL21Compiler.from_clause(EJBQL21Compiler.java:201)
> at
> org.tranql.ejb.parser.EJBQL21Compiler.ejbql(EJBQL21Compiler.java:115)
> at
> org.tranql.sql.EJBQLToPhysicalQuery.getEJBQLQuery(EJBQLToPhysicalQuery.java:233)
> ... 38 more
>
>
> So, basically, the ejbQL
> select distinct object(r) from Rasse as r, in (r.partei) as p order by
> p.parteiName asc,r.rassenName asc
> is wrong. However, the ejbQL
> select distinct object(r) from Rasse as r order by r.rassenName asc
> works.
>
> Does anyone know what "Path used must end with a multi valued CMR field"
> mean?
>
> Or is this somehow related to the prefetch system by Geronimo?
>
> Best regards
>
> Dirk
>
>
Re: ejbQL with relations
Posted by "D. Strauss" <ge...@ds-2.de>.
Hello, Aaron,
funnily another task is coming along :P Now, my finder looks like
select distinct object(g) from Guild as g order by g.uildName asc,
g.realm.realmName asc
It is working AS LONG AS I don't use the prefetch setting All (for
loading all the cmr and cmp fields from the bean). When I use the
prefetch setting Default (load only the cmp fields) everything is
working. So, here is just another stacktrace (just = Just Another
StackTrace ... funny :P):
[SQLQueryBuilder] CMP [Entity logical name=[Guild]; physical
name=[Guild]] - entity load command compiled to [PrefetchQueryCommand
[JDBCQueryCommand sql=[SELECT G.id, G.name, G.homepageurl, T0.id,
T0.name, T0.warteschlange, T0.art, T0.aktiv FROM guilds G LEFT JOIN
realmlist T0 ON (T0.id = G.refrealm) WHERE G.id = ?]]]
Deployer operation failed: Unable to initialize EJB named 'Guild': null
org.apache.geronimo.common.DeploymentException: Unable to initialize EJB
named 'Guild': null
at
org.openejb.deployment.CMPEntityBuilder.createBean(CMPEntityBuilder.java:208)
at
org.openejb.deployment.CMPEntityBuilder.buildBeans(CMPEntityBuilder.java:120)
at
org.openejb.deployment.OpenEJBModuleBuilder.addGBeans(OpenEJBModuleBuilder.java:525)
at
org.openejb.deployment.OpenEJBModuleBuilder$$FastClassByCGLIB$$11bd7b20.invoke(<generated>)
at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
at
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:122)
at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:817)
at
org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
at
org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
at
org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
at
org.apache.geronimo.j2ee.deployment.ModuleBuilder$$EnhancerByCGLIB$$70ea3853.addGBeans(<generated>)
at
org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:562)
at
org.apache.geronimo.j2ee.deployment.EARConfigBuilder$$FastClassByCGLIB$$38e56ec6.invoke(<generated>)
at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
at
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:122)
at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:817)
at
org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
at
org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
at
org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
at
org.apache.geronimo.deployment.ConfigurationBuilder$$EnhancerByCGLIB$$7cd740c5.buildConfiguration(<generated>)
at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:302)
at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:124)
at
org.apache.geronimo.deployment.Deployer$$FastClassByCGLIB$$734a235d.invoke(<generated>)
at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
at
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:122)
at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:852)
at
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
at
org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDeploy(AbstractDeployCommand.java:106)
at
org.apache.geronimo.deployment.plugin.local.RedeployCommand.redeploySameConfiguration(RedeployCommand.java:218)
at
org.apache.geronimo.deployment.plugin.local.RedeployCommand.run(RedeployCommand.java:99)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.NullPointerException
at
org.tranql.builder.QueryTileBuilder.buildJoinCondition(QueryTileBuilder.java:198)
at
org.tranql.builder.QueryTileBuilder.buildJoinCondition(QueryTileBuilder.java:129)
at
org.tranql.sql.prefetch.PrefetchGroupTransform$Context.addFrom(PrefetchGroupTransform.java:126)
at
org.tranql.sql.prefetch.PrefetchGroupTransform.visit(PrefetchGroupTransform.java:262)
at org.tranql.ql.QuerySource.visit(QuerySource.java:46)
at org.tranql.query.QueryCloner.visitChildren(QueryCloner.java:70)
at org.tranql.query.QueryCloner.visit(QueryCloner.java:97)
at org.tranql.ql.From.visit(From.java:30)
at org.tranql.query.QueryCloner.visitChildren(QueryCloner.java:70)
at org.tranql.query.QueryCloner.visit(QueryCloner.java:259)
at
org.tranql.sql.prefetch.PrefetchGroupTransform.visit(PrefetchGroupTransform.java:168)
at org.tranql.ql.Query.visit(Query.java:59)
at
org.tranql.sql.prefetch.PrefetchGroupTransform.transform(PrefetchGroupTransform.java:137)
at
org.tranql.builder.SQLQueryBuilder.buildFinders(SQLQueryBuilder.java:191)
at
org.openejb.deployment.CMPContainerBuilder.buildIt(CMPContainerBuilder.java:282)
at
org.openejb.deployment.AbstractContainerBuilder.createConfiguration(AbstractContainerBuilder.java:354)
at
org.openejb.deployment.CMPEntityBuilder.createBean(CMPEntityBuilder.java:206)
... 33 more
Is it because there is not yet any data in the database? Switching back
to prefetch Default makes the EJB load. So, it still makes me curious :P
I'll switch back to Default. As you've written in your Geronimo Devel
book it's just a performance switch :P
Anyway, it's something that could make you stay awake at night ^^;;;;
Best regards
Dirk
Aaron Mulder schrieb:
> Glad to hear that you figured it out! Thanks for following up.
>
> Aaron
>
> On 7/12/06, D. Strauss <ge...@ds-2.de> wrote:
>> Hello, Aaron,
>>
>> after re-reading your answer I came up with a strange idea. After some
>> research and testing I can finally say: I was wrong ^^;;;;
>>
>> My ejbQL was
>>
>> select distinct object(g) from Guild as g, in (g.realm) as r order by
>> r.realmName asc
>>
>> But I learned a wrong ejbQL: the IN statement is for a collection. So,
>> you were right: realm IS NOT a collection but a simple lonely cmr field
>> that references another entity. I always thought that IN() is for
>> reading from a related bean (think of IN as an additional load).
>>
>> So, sorry for spamming the ML with this ^^;;;; my bad.
>>
>> For the curious people: the working ejbQL is:
>>
>> select distinct object(g) from Guild as g order by g.realm.realmName asc
>>
>> Best regards
>>
>> Dirk
>>
>> D. Strauss schrieb:
>> > Hello, Aaron
>> >
>> > seems that my "workaround" failed. As soon as a relation column is used
>> > within a finder ejbQL TranQL gives up ... or better said: it seems that
>> > it gives up. Here a nice stack trace that emphasizes my problem:
>> >
>> > Caused by: org.tranql.ql.QueryException: Finder [Finder
>> > method=[findAll]; EJB-QL=[select distinct object(g) from Guild as g, in
>> > (g.realm) as r order by g.guildName asc, r.realmName asc]]
>> > at
>> >
>> org.tranql.sql.EJBQLToPhysicalQuery.buildFinder(EJBQLToPhysicalQuery.java:143)
>>
>> > at
>> >
>> org.tranql.sql.EJBQLToPhysicalQuery.buildFinders(EJBQLToPhysicalQuery.java:90)
>>
>> > ... 36 more
>> > Caused by: org.tranql.ql.QueryException: Parser, lexer or Tree-walker
>> > exception
>> > at
>> >
>> org.tranql.sql.EJBQLToPhysicalQuery.getEJBQLQuery(EJBQLToPhysicalQuery.java:235)
>>
>> > at
>> >
>> org.tranql.sql.EJBQLToPhysicalQuery.buildFinder(EJBQLToPhysicalQuery.java:130)
>>
>> > ... 37 more
>> > Caused by: org.tranql.ql.MalformedNodeException: Path used must end
>> with
>> > a multi valued CMR field
>> > at
>> org.tranql.ql.DerivedTable.getEntityType(DerivedTable.java:61)
>> > at org.tranql.ql.DerivedTable.<init>(DerivedTable.java:36)
>> > at
>> >
>> org.tranql.ejb.parser.EJBQL21Compiler.collection_member_declaration(EJBQL21Compiler.java:473)
>>
>> > at
>> >
>> org.tranql.ejb.parser.EJBQL21Compiler.from_clause(EJBQL21Compiler.java:201)
>>
>> > at
>> > org.tranql.ejb.parser.EJBQL21Compiler.ejbql(EJBQL21Compiler.java:115)
>> > at
>> >
>> org.tranql.sql.EJBQLToPhysicalQuery.getEJBQLQuery(EJBQLToPhysicalQuery.java:233)
>>
>> > ... 38 more
>> >
>> > So, it is a TranQL problem? Should I post this to the TranQL ML?
>> >
>> > Oh, before I forgot:
>> >
>> > Guild n:1 Realm
>> >
>> > (1 Realm can have multiple guilds, but 1 guild can only belong to 1
>> > Realm, so 1:n relation).
>> >
>> > My openejb-jar.xml for the relation looks like:
>> >
>> > <ejb-relation>
>> > <ejb-relation-name>relGuildRealm</ejb-relation-name>
>> > <ejb-relationship-role>
>> > <ejb-relationship-role-name>
>> > r1
>> > </ejb-relationship-role-name>
>> > <relationship-role-source>
>> > <ejb-name>Guild</ejb-name>
>> > </relationship-role-source>
>> > <cmr-field>
>> > <cmr-field-name>realm</cmr-field-name>
>> > </cmr-field>
>> > <foreign-key-column-on-source />
>> > <role-mapping>
>> > <cmr-field-mapping>
>> > <key-column>id</key-column>
>> > <foreign-key-column>
>> > refrealm
>> > </foreign-key-column>
>> > </cmr-field-mapping>
>> > </role-mapping>
>> > </ejb-relationship-role>
>> > </ejb-relation>
>> >
>> > Let me know if you need more information.
>> >
>> > Best regards
>> >
>> > Dirk
>> >
>> > Aaron Mulder schrieb:
>> >> My guess would be that r.partei refers to a single entity (as in a
>> >> 1-to-1 relationship between r and p) but the "in" operator expects its
>> >> argument to be a group or set (as in a 1-to-many) relationship. Does
>> >> that sound right?
>> >>
>> >> Thanks,
>> >> Aaron
>> >>
>> >> On 7/7/06, D. Strauss <ge...@ds-2.de> wrote:
>> >>> Hello, ejbQL profs ^^
>> >>>
>> >>> seems that I missunderstood my ejbQL knowledge. I setup some ejbs and
>> >>> wanted to create some finder methods (ejb-jar.xml). Unfortunately,
>> >>> Geronimo (or OpenEJB?) ends in an exception that I can't figure
>> out what
>> >>> it wants to tell me.
>> >>>
>> >>>
>> >>>
>> >>> Caused by: org.tranql.ql.QueryException: Finder [Finder
>> >>> method=[findAll]; EJB-QL=[select distinct object(r) from Rasse as
>> r, in
>> >>> (r.partei) as p order by p.parteiName asc,r.rassenName asc]]
>> >>> at
>> >>>
>> org.tranql.sql.EJBQLToPhysicalQuery.buildFinder(EJBQLToPhysicalQuery.java:143)
>>
>> >>>
>> >>> at
>> >>>
>> org.tranql.sql.EJBQLToPhysicalQuery.buildFinders(EJBQLToPhysicalQuery.java:90)
>>
>> >>>
>> >>> ... 36 more
>> >>> Caused by: org.tranql.ql.QueryException: Parser, lexer or Tree-walker
>> >>> exception
>> >>> at
>> >>>
>> org.tranql.sql.EJBQLToPhysicalQuery.getEJBQLQuery(EJBQLToPhysicalQuery.java:235)
>>
>> >>>
>> >>> at
>> >>>
>> org.tranql.sql.EJBQLToPhysicalQuery.buildFinder(EJBQLToPhysicalQuery.java:130)
>>
>> >>>
>> >>> ... 37 more
>> >>> Caused by: org.tranql.ql.MalformedNodeException: Path used must
>> end with
>> >>> a multi valued CMR field
>> >>> at
>> org.tranql.ql.DerivedTable.getEntityType(DerivedTable.java:61)
>> >>> at org.tranql.ql.DerivedTable.<init>(DerivedTable.java:36)
>> >>> at
>> >>>
>> org.tranql.ejb.parser.EJBQL21Compiler.collection_member_declaration(EJBQL21Compiler.java:473)
>>
>> >>>
>> >>> at
>> >>>
>> org.tranql.ejb.parser.EJBQL21Compiler.from_clause(EJBQL21Compiler.java:201)
>>
>> >>>
>> >>> at
>> >>> org.tranql.ejb.parser.EJBQL21Compiler.ejbql(EJBQL21Compiler.java:115)
>> >>> at
>> >>>
>> org.tranql.sql.EJBQLToPhysicalQuery.getEJBQLQuery(EJBQLToPhysicalQuery.java:233)
>>
>> >>>
>> >>> ... 38 more
>> >>>
>> >>>
>> >>> So, basically, the ejbQL
>> >>> select distinct object(r) from Rasse as r, in (r.partei) as p
>> >>> order by
>> >>> p.parteiName asc,r.rassenName asc
>> >>> is wrong. However, the ejbQL
>> >>> select distinct object(r) from Rasse as r order by
>> >>> r.rassenName asc
>> >>> works.
>> >>>
>> >>> Does anyone know what "Path used must end with a multi valued CMR
>> field"
>> >>> mean?
>> >>>
>> >>> Or is this somehow related to the prefetch system by Geronimo?
>> >>>
>> >>> Best regards
>> >>>
>> >>> Dirk
>> >>>
>> >>
>> >
>> >
>>
>
>
Re: ejbQL with relations
Posted by Aaron Mulder <am...@alumni.princeton.edu>.
Glad to hear that you figured it out! Thanks for following up.
Aaron
On 7/12/06, D. Strauss <ge...@ds-2.de> wrote:
> Hello, Aaron,
>
> after re-reading your answer I came up with a strange idea. After some
> research and testing I can finally say: I was wrong ^^;;;;
>
> My ejbQL was
>
> select distinct object(g) from Guild as g, in (g.realm) as r order by
> r.realmName asc
>
> But I learned a wrong ejbQL: the IN statement is for a collection. So,
> you were right: realm IS NOT a collection but a simple lonely cmr field
> that references another entity. I always thought that IN() is for
> reading from a related bean (think of IN as an additional load).
>
> So, sorry for spamming the ML with this ^^;;;; my bad.
>
> For the curious people: the working ejbQL is:
>
> select distinct object(g) from Guild as g order by g.realm.realmName asc
>
> Best regards
>
> Dirk
>
> D. Strauss schrieb:
> > Hello, Aaron
> >
> > seems that my "workaround" failed. As soon as a relation column is used
> > within a finder ejbQL TranQL gives up ... or better said: it seems that
> > it gives up. Here a nice stack trace that emphasizes my problem:
> >
> > Caused by: org.tranql.ql.QueryException: Finder [Finder
> > method=[findAll]; EJB-QL=[select distinct object(g) from Guild as g, in
> > (g.realm) as r order by g.guildName asc, r.realmName asc]]
> > at
> > org.tranql.sql.EJBQLToPhysicalQuery.buildFinder(EJBQLToPhysicalQuery.java:143)
> > at
> > org.tranql.sql.EJBQLToPhysicalQuery.buildFinders(EJBQLToPhysicalQuery.java:90)
> > ... 36 more
> > Caused by: org.tranql.ql.QueryException: Parser, lexer or Tree-walker
> > exception
> > at
> > org.tranql.sql.EJBQLToPhysicalQuery.getEJBQLQuery(EJBQLToPhysicalQuery.java:235)
> > at
> > org.tranql.sql.EJBQLToPhysicalQuery.buildFinder(EJBQLToPhysicalQuery.java:130)
> > ... 37 more
> > Caused by: org.tranql.ql.MalformedNodeException: Path used must end with
> > a multi valued CMR field
> > at org.tranql.ql.DerivedTable.getEntityType(DerivedTable.java:61)
> > at org.tranql.ql.DerivedTable.<init>(DerivedTable.java:36)
> > at
> > org.tranql.ejb.parser.EJBQL21Compiler.collection_member_declaration(EJBQL21Compiler.java:473)
> > at
> > org.tranql.ejb.parser.EJBQL21Compiler.from_clause(EJBQL21Compiler.java:201)
> > at
> > org.tranql.ejb.parser.EJBQL21Compiler.ejbql(EJBQL21Compiler.java:115)
> > at
> > org.tranql.sql.EJBQLToPhysicalQuery.getEJBQLQuery(EJBQLToPhysicalQuery.java:233)
> > ... 38 more
> >
> > So, it is a TranQL problem? Should I post this to the TranQL ML?
> >
> > Oh, before I forgot:
> >
> > Guild n:1 Realm
> >
> > (1 Realm can have multiple guilds, but 1 guild can only belong to 1
> > Realm, so 1:n relation).
> >
> > My openejb-jar.xml for the relation looks like:
> >
> > <ejb-relation>
> > <ejb-relation-name>relGuildRealm</ejb-relation-name>
> > <ejb-relationship-role>
> > <ejb-relationship-role-name>
> > r1
> > </ejb-relationship-role-name>
> > <relationship-role-source>
> > <ejb-name>Guild</ejb-name>
> > </relationship-role-source>
> > <cmr-field>
> > <cmr-field-name>realm</cmr-field-name>
> > </cmr-field>
> > <foreign-key-column-on-source />
> > <role-mapping>
> > <cmr-field-mapping>
> > <key-column>id</key-column>
> > <foreign-key-column>
> > refrealm
> > </foreign-key-column>
> > </cmr-field-mapping>
> > </role-mapping>
> > </ejb-relationship-role>
> > </ejb-relation>
> >
> > Let me know if you need more information.
> >
> > Best regards
> >
> > Dirk
> >
> > Aaron Mulder schrieb:
> >> My guess would be that r.partei refers to a single entity (as in a
> >> 1-to-1 relationship between r and p) but the "in" operator expects its
> >> argument to be a group or set (as in a 1-to-many) relationship. Does
> >> that sound right?
> >>
> >> Thanks,
> >> Aaron
> >>
> >> On 7/7/06, D. Strauss <ge...@ds-2.de> wrote:
> >>> Hello, ejbQL profs ^^
> >>>
> >>> seems that I missunderstood my ejbQL knowledge. I setup some ejbs and
> >>> wanted to create some finder methods (ejb-jar.xml). Unfortunately,
> >>> Geronimo (or OpenEJB?) ends in an exception that I can't figure out what
> >>> it wants to tell me.
> >>>
> >>>
> >>>
> >>> Caused by: org.tranql.ql.QueryException: Finder [Finder
> >>> method=[findAll]; EJB-QL=[select distinct object(r) from Rasse as r, in
> >>> (r.partei) as p order by p.parteiName asc,r.rassenName asc]]
> >>> at
> >>> org.tranql.sql.EJBQLToPhysicalQuery.buildFinder(EJBQLToPhysicalQuery.java:143)
> >>>
> >>> at
> >>> org.tranql.sql.EJBQLToPhysicalQuery.buildFinders(EJBQLToPhysicalQuery.java:90)
> >>>
> >>> ... 36 more
> >>> Caused by: org.tranql.ql.QueryException: Parser, lexer or Tree-walker
> >>> exception
> >>> at
> >>> org.tranql.sql.EJBQLToPhysicalQuery.getEJBQLQuery(EJBQLToPhysicalQuery.java:235)
> >>>
> >>> at
> >>> org.tranql.sql.EJBQLToPhysicalQuery.buildFinder(EJBQLToPhysicalQuery.java:130)
> >>>
> >>> ... 37 more
> >>> Caused by: org.tranql.ql.MalformedNodeException: Path used must end with
> >>> a multi valued CMR field
> >>> at org.tranql.ql.DerivedTable.getEntityType(DerivedTable.java:61)
> >>> at org.tranql.ql.DerivedTable.<init>(DerivedTable.java:36)
> >>> at
> >>> org.tranql.ejb.parser.EJBQL21Compiler.collection_member_declaration(EJBQL21Compiler.java:473)
> >>>
> >>> at
> >>> org.tranql.ejb.parser.EJBQL21Compiler.from_clause(EJBQL21Compiler.java:201)
> >>>
> >>> at
> >>> org.tranql.ejb.parser.EJBQL21Compiler.ejbql(EJBQL21Compiler.java:115)
> >>> at
> >>> org.tranql.sql.EJBQLToPhysicalQuery.getEJBQLQuery(EJBQLToPhysicalQuery.java:233)
> >>>
> >>> ... 38 more
> >>>
> >>>
> >>> So, basically, the ejbQL
> >>> select distinct object(r) from Rasse as r, in (r.partei) as p
> >>> order by
> >>> p.parteiName asc,r.rassenName asc
> >>> is wrong. However, the ejbQL
> >>> select distinct object(r) from Rasse as r order by
> >>> r.rassenName asc
> >>> works.
> >>>
> >>> Does anyone know what "Path used must end with a multi valued CMR field"
> >>> mean?
> >>>
> >>> Or is this somehow related to the prefetch system by Geronimo?
> >>>
> >>> Best regards
> >>>
> >>> Dirk
> >>>
> >>
> >
> >
>
Re: ejbQL with relations
Posted by "D. Strauss" <ge...@ds-2.de>.
Hello, Aaron,
after re-reading your answer I came up with a strange idea. After some
research and testing I can finally say: I was wrong ^^;;;;
My ejbQL was
select distinct object(g) from Guild as g, in (g.realm) as r order by
r.realmName asc
But I learned a wrong ejbQL: the IN statement is for a collection. So,
you were right: realm IS NOT a collection but a simple lonely cmr field
that references another entity. I always thought that IN() is for
reading from a related bean (think of IN as an additional load).
So, sorry for spamming the ML with this ^^;;;; my bad.
For the curious people: the working ejbQL is:
select distinct object(g) from Guild as g order by g.realm.realmName asc
Best regards
Dirk
D. Strauss schrieb:
> Hello, Aaron
>
> seems that my "workaround" failed. As soon as a relation column is used
> within a finder ejbQL TranQL gives up ... or better said: it seems that
> it gives up. Here a nice stack trace that emphasizes my problem:
>
> Caused by: org.tranql.ql.QueryException: Finder [Finder
> method=[findAll]; EJB-QL=[select distinct object(g) from Guild as g, in
> (g.realm) as r order by g.guildName asc, r.realmName asc]]
> at
> org.tranql.sql.EJBQLToPhysicalQuery.buildFinder(EJBQLToPhysicalQuery.java:143)
> at
> org.tranql.sql.EJBQLToPhysicalQuery.buildFinders(EJBQLToPhysicalQuery.java:90)
> ... 36 more
> Caused by: org.tranql.ql.QueryException: Parser, lexer or Tree-walker
> exception
> at
> org.tranql.sql.EJBQLToPhysicalQuery.getEJBQLQuery(EJBQLToPhysicalQuery.java:235)
> at
> org.tranql.sql.EJBQLToPhysicalQuery.buildFinder(EJBQLToPhysicalQuery.java:130)
> ... 37 more
> Caused by: org.tranql.ql.MalformedNodeException: Path used must end with
> a multi valued CMR field
> at org.tranql.ql.DerivedTable.getEntityType(DerivedTable.java:61)
> at org.tranql.ql.DerivedTable.<init>(DerivedTable.java:36)
> at
> org.tranql.ejb.parser.EJBQL21Compiler.collection_member_declaration(EJBQL21Compiler.java:473)
> at
> org.tranql.ejb.parser.EJBQL21Compiler.from_clause(EJBQL21Compiler.java:201)
> at
> org.tranql.ejb.parser.EJBQL21Compiler.ejbql(EJBQL21Compiler.java:115)
> at
> org.tranql.sql.EJBQLToPhysicalQuery.getEJBQLQuery(EJBQLToPhysicalQuery.java:233)
> ... 38 more
>
> So, it is a TranQL problem? Should I post this to the TranQL ML?
>
> Oh, before I forgot:
>
> Guild n:1 Realm
>
> (1 Realm can have multiple guilds, but 1 guild can only belong to 1
> Realm, so 1:n relation).
>
> My openejb-jar.xml for the relation looks like:
>
> <ejb-relation>
> <ejb-relation-name>relGuildRealm</ejb-relation-name>
> <ejb-relationship-role>
> <ejb-relationship-role-name>
> r1
> </ejb-relationship-role-name>
> <relationship-role-source>
> <ejb-name>Guild</ejb-name>
> </relationship-role-source>
> <cmr-field>
> <cmr-field-name>realm</cmr-field-name>
> </cmr-field>
> <foreign-key-column-on-source />
> <role-mapping>
> <cmr-field-mapping>
> <key-column>id</key-column>
> <foreign-key-column>
> refrealm
> </foreign-key-column>
> </cmr-field-mapping>
> </role-mapping>
> </ejb-relationship-role>
> </ejb-relation>
>
> Let me know if you need more information.
>
> Best regards
>
> Dirk
>
> Aaron Mulder schrieb:
>> My guess would be that r.partei refers to a single entity (as in a
>> 1-to-1 relationship between r and p) but the "in" operator expects its
>> argument to be a group or set (as in a 1-to-many) relationship. Does
>> that sound right?
>>
>> Thanks,
>> Aaron
>>
>> On 7/7/06, D. Strauss <ge...@ds-2.de> wrote:
>>> Hello, ejbQL profs ^^
>>>
>>> seems that I missunderstood my ejbQL knowledge. I setup some ejbs and
>>> wanted to create some finder methods (ejb-jar.xml). Unfortunately,
>>> Geronimo (or OpenEJB?) ends in an exception that I can't figure out what
>>> it wants to tell me.
>>>
>>>
>>>
>>> Caused by: org.tranql.ql.QueryException: Finder [Finder
>>> method=[findAll]; EJB-QL=[select distinct object(r) from Rasse as r, in
>>> (r.partei) as p order by p.parteiName asc,r.rassenName asc]]
>>> at
>>> org.tranql.sql.EJBQLToPhysicalQuery.buildFinder(EJBQLToPhysicalQuery.java:143)
>>>
>>> at
>>> org.tranql.sql.EJBQLToPhysicalQuery.buildFinders(EJBQLToPhysicalQuery.java:90)
>>>
>>> ... 36 more
>>> Caused by: org.tranql.ql.QueryException: Parser, lexer or Tree-walker
>>> exception
>>> at
>>> org.tranql.sql.EJBQLToPhysicalQuery.getEJBQLQuery(EJBQLToPhysicalQuery.java:235)
>>>
>>> at
>>> org.tranql.sql.EJBQLToPhysicalQuery.buildFinder(EJBQLToPhysicalQuery.java:130)
>>>
>>> ... 37 more
>>> Caused by: org.tranql.ql.MalformedNodeException: Path used must end with
>>> a multi valued CMR field
>>> at org.tranql.ql.DerivedTable.getEntityType(DerivedTable.java:61)
>>> at org.tranql.ql.DerivedTable.<init>(DerivedTable.java:36)
>>> at
>>> org.tranql.ejb.parser.EJBQL21Compiler.collection_member_declaration(EJBQL21Compiler.java:473)
>>>
>>> at
>>> org.tranql.ejb.parser.EJBQL21Compiler.from_clause(EJBQL21Compiler.java:201)
>>>
>>> at
>>> org.tranql.ejb.parser.EJBQL21Compiler.ejbql(EJBQL21Compiler.java:115)
>>> at
>>> org.tranql.sql.EJBQLToPhysicalQuery.getEJBQLQuery(EJBQLToPhysicalQuery.java:233)
>>>
>>> ... 38 more
>>>
>>>
>>> So, basically, the ejbQL
>>> select distinct object(r) from Rasse as r, in (r.partei) as p
>>> order by
>>> p.parteiName asc,r.rassenName asc
>>> is wrong. However, the ejbQL
>>> select distinct object(r) from Rasse as r order by
>>> r.rassenName asc
>>> works.
>>>
>>> Does anyone know what "Path used must end with a multi valued CMR field"
>>> mean?
>>>
>>> Or is this somehow related to the prefetch system by Geronimo?
>>>
>>> Best regards
>>>
>>> Dirk
>>>
>>
>
>
Re: ejbQL with relations
Posted by "D. Strauss" <ge...@ds-2.de>.
Hello, Aaron
seems that my "workaround" failed. As soon as a relation column is used
within a finder ejbQL TranQL gives up ... or better said: it seems that
it gives up. Here a nice stack trace that emphasizes my problem:
Caused by: org.tranql.ql.QueryException: Finder [Finder
method=[findAll]; EJB-QL=[select distinct object(g) from Guild as g, in
(g.realm) as r order by g.guildName asc, r.realmName asc]]
at
org.tranql.sql.EJBQLToPhysicalQuery.buildFinder(EJBQLToPhysicalQuery.java:143)
at
org.tranql.sql.EJBQLToPhysicalQuery.buildFinders(EJBQLToPhysicalQuery.java:90)
... 36 more
Caused by: org.tranql.ql.QueryException: Parser, lexer or Tree-walker
exception
at
org.tranql.sql.EJBQLToPhysicalQuery.getEJBQLQuery(EJBQLToPhysicalQuery.java:235)
at
org.tranql.sql.EJBQLToPhysicalQuery.buildFinder(EJBQLToPhysicalQuery.java:130)
... 37 more
Caused by: org.tranql.ql.MalformedNodeException: Path used must end with
a multi valued CMR field
at org.tranql.ql.DerivedTable.getEntityType(DerivedTable.java:61)
at org.tranql.ql.DerivedTable.<init>(DerivedTable.java:36)
at
org.tranql.ejb.parser.EJBQL21Compiler.collection_member_declaration(EJBQL21Compiler.java:473)
at
org.tranql.ejb.parser.EJBQL21Compiler.from_clause(EJBQL21Compiler.java:201)
at
org.tranql.ejb.parser.EJBQL21Compiler.ejbql(EJBQL21Compiler.java:115)
at
org.tranql.sql.EJBQLToPhysicalQuery.getEJBQLQuery(EJBQLToPhysicalQuery.java:233)
... 38 more
So, it is a TranQL problem? Should I post this to the TranQL ML?
Oh, before I forgot:
Guild n:1 Realm
(1 Realm can have multiple guilds, but 1 guild can only belong to 1
Realm, so 1:n relation).
My openejb-jar.xml for the relation looks like:
<ejb-relation>
<ejb-relation-name>relGuildRealm</ejb-relation-name>
<ejb-relationship-role>
<ejb-relationship-role-name>
r1
</ejb-relationship-role-name>
<relationship-role-source>
<ejb-name>Guild</ejb-name>
</relationship-role-source>
<cmr-field>
<cmr-field-name>realm</cmr-field-name>
</cmr-field>
<foreign-key-column-on-source />
<role-mapping>
<cmr-field-mapping>
<key-column>id</key-column>
<foreign-key-column>
refrealm
</foreign-key-column>
</cmr-field-mapping>
</role-mapping>
</ejb-relationship-role>
</ejb-relation>
Let me know if you need more information.
Best regards
Dirk
Aaron Mulder schrieb:
> My guess would be that r.partei refers to a single entity (as in a
> 1-to-1 relationship between r and p) but the "in" operator expects its
> argument to be a group or set (as in a 1-to-many) relationship. Does
> that sound right?
>
> Thanks,
> Aaron
>
> On 7/7/06, D. Strauss <ge...@ds-2.de> wrote:
>> Hello, ejbQL profs ^^
>>
>> seems that I missunderstood my ejbQL knowledge. I setup some ejbs and
>> wanted to create some finder methods (ejb-jar.xml). Unfortunately,
>> Geronimo (or OpenEJB?) ends in an exception that I can't figure out what
>> it wants to tell me.
>>
>>
>>
>> Caused by: org.tranql.ql.QueryException: Finder [Finder
>> method=[findAll]; EJB-QL=[select distinct object(r) from Rasse as r, in
>> (r.partei) as p order by p.parteiName asc,r.rassenName asc]]
>> at
>> org.tranql.sql.EJBQLToPhysicalQuery.buildFinder(EJBQLToPhysicalQuery.java:143)
>>
>> at
>> org.tranql.sql.EJBQLToPhysicalQuery.buildFinders(EJBQLToPhysicalQuery.java:90)
>>
>> ... 36 more
>> Caused by: org.tranql.ql.QueryException: Parser, lexer or Tree-walker
>> exception
>> at
>> org.tranql.sql.EJBQLToPhysicalQuery.getEJBQLQuery(EJBQLToPhysicalQuery.java:235)
>>
>> at
>> org.tranql.sql.EJBQLToPhysicalQuery.buildFinder(EJBQLToPhysicalQuery.java:130)
>>
>> ... 37 more
>> Caused by: org.tranql.ql.MalformedNodeException: Path used must end with
>> a multi valued CMR field
>> at org.tranql.ql.DerivedTable.getEntityType(DerivedTable.java:61)
>> at org.tranql.ql.DerivedTable.<init>(DerivedTable.java:36)
>> at
>> org.tranql.ejb.parser.EJBQL21Compiler.collection_member_declaration(EJBQL21Compiler.java:473)
>>
>> at
>> org.tranql.ejb.parser.EJBQL21Compiler.from_clause(EJBQL21Compiler.java:201)
>>
>> at
>> org.tranql.ejb.parser.EJBQL21Compiler.ejbql(EJBQL21Compiler.java:115)
>> at
>> org.tranql.sql.EJBQLToPhysicalQuery.getEJBQLQuery(EJBQLToPhysicalQuery.java:233)
>>
>> ... 38 more
>>
>>
>> So, basically, the ejbQL
>> select distinct object(r) from Rasse as r, in (r.partei) as p
>> order by
>> p.parteiName asc,r.rassenName asc
>> is wrong. However, the ejbQL
>> select distinct object(r) from Rasse as r order by
>> r.rassenName asc
>> works.
>>
>> Does anyone know what "Path used must end with a multi valued CMR field"
>> mean?
>>
>> Or is this somehow related to the prefetch system by Geronimo?
>>
>> Best regards
>>
>> Dirk
>>
>
>
Re: ejbQL with relations
Posted by "D. Strauss" <ge...@ds-2.de>.
Hello, Aaron,
no :P
Actually, I have 1 partei (aka party) but a lot of other races (aka
rasse(n), german language, sorry). So it's a common 1:n relation. I hope
that I implemented it right into Geronimo but still for now there are no
problems.
However, I fixed the ejbQL bug temporarily by setting the finder method
prefetch mechanism from All to Default (aka: don't load any cmr fields
right now). It seems to work. Now I'm working on a JSP page that uses
this findAll() method.
Let's see ...
Best regards
Dirk
Aaron Mulder schrieb:
> My guess would be that r.partei refers to a single entity (as in a
> 1-to-1 relationship between r and p) but the "in" operator expects its
> argument to be a group or set (as in a 1-to-many) relationship. Does
> that sound right?
>
> Thanks,
> Aaron
>
> On 7/7/06, D. Strauss <ge...@ds-2.de> wrote:
>> Hello, ejbQL profs ^^
>>
>> seems that I missunderstood my ejbQL knowledge. I setup some ejbs and
>> wanted to create some finder methods (ejb-jar.xml). Unfortunately,
>> Geronimo (or OpenEJB?) ends in an exception that I can't figure out what
>> it wants to tell me.
>>
>>
>>
>> Caused by: org.tranql.ql.QueryException: Finder [Finder
>> method=[findAll]; EJB-QL=[select distinct object(r) from Rasse as r, in
>> (r.partei) as p order by p.parteiName asc,r.rassenName asc]]
>> at
>> org.tranql.sql.EJBQLToPhysicalQuery.buildFinder(EJBQLToPhysicalQuery.java:143)
>>
>> at
>> org.tranql.sql.EJBQLToPhysicalQuery.buildFinders(EJBQLToPhysicalQuery.java:90)
>>
>> ... 36 more
>> Caused by: org.tranql.ql.QueryException: Parser, lexer or Tree-walker
>> exception
>> at
>> org.tranql.sql.EJBQLToPhysicalQuery.getEJBQLQuery(EJBQLToPhysicalQuery.java:235)
>>
>> at
>> org.tranql.sql.EJBQLToPhysicalQuery.buildFinder(EJBQLToPhysicalQuery.java:130)
>>
>> ... 37 more
>> Caused by: org.tranql.ql.MalformedNodeException: Path used must end with
>> a multi valued CMR field
>> at org.tranql.ql.DerivedTable.getEntityType(DerivedTable.java:61)
>> at org.tranql.ql.DerivedTable.<init>(DerivedTable.java:36)
>> at
>> org.tranql.ejb.parser.EJBQL21Compiler.collection_member_declaration(EJBQL21Compiler.java:473)
>>
>> at
>> org.tranql.ejb.parser.EJBQL21Compiler.from_clause(EJBQL21Compiler.java:201)
>>
>> at
>> org.tranql.ejb.parser.EJBQL21Compiler.ejbql(EJBQL21Compiler.java:115)
>> at
>> org.tranql.sql.EJBQLToPhysicalQuery.getEJBQLQuery(EJBQLToPhysicalQuery.java:233)
>>
>> ... 38 more
>>
>>
>> So, basically, the ejbQL
>> select distinct object(r) from Rasse as r, in (r.partei) as p
>> order by
>> p.parteiName asc,r.rassenName asc
>> is wrong. However, the ejbQL
>> select distinct object(r) from Rasse as r order by
>> r.rassenName asc
>> works.
>>
>> Does anyone know what "Path used must end with a multi valued CMR field"
>> mean?
>>
>> Or is this somehow related to the prefetch system by Geronimo?
>>
>> Best regards
>>
>> Dirk
>>
>
>
Re: ejbQL with relations
Posted by Aaron Mulder <am...@alumni.princeton.edu>.
My guess would be that r.partei refers to a single entity (as in a
1-to-1 relationship between r and p) but the "in" operator expects its
argument to be a group or set (as in a 1-to-many) relationship. Does
that sound right?
Thanks,
Aaron
On 7/7/06, D. Strauss <ge...@ds-2.de> wrote:
> Hello, ejbQL profs ^^
>
> seems that I missunderstood my ejbQL knowledge. I setup some ejbs and
> wanted to create some finder methods (ejb-jar.xml). Unfortunately,
> Geronimo (or OpenEJB?) ends in an exception that I can't figure out what
> it wants to tell me.
>
>
>
> Caused by: org.tranql.ql.QueryException: Finder [Finder
> method=[findAll]; EJB-QL=[select distinct object(r) from Rasse as r, in
> (r.partei) as p order by p.parteiName asc,r.rassenName asc]]
> at
> org.tranql.sql.EJBQLToPhysicalQuery.buildFinder(EJBQLToPhysicalQuery.java:143)
> at
> org.tranql.sql.EJBQLToPhysicalQuery.buildFinders(EJBQLToPhysicalQuery.java:90)
> ... 36 more
> Caused by: org.tranql.ql.QueryException: Parser, lexer or Tree-walker
> exception
> at
> org.tranql.sql.EJBQLToPhysicalQuery.getEJBQLQuery(EJBQLToPhysicalQuery.java:235)
> at
> org.tranql.sql.EJBQLToPhysicalQuery.buildFinder(EJBQLToPhysicalQuery.java:130)
> ... 37 more
> Caused by: org.tranql.ql.MalformedNodeException: Path used must end with
> a multi valued CMR field
> at org.tranql.ql.DerivedTable.getEntityType(DerivedTable.java:61)
> at org.tranql.ql.DerivedTable.<init>(DerivedTable.java:36)
> at
> org.tranql.ejb.parser.EJBQL21Compiler.collection_member_declaration(EJBQL21Compiler.java:473)
> at
> org.tranql.ejb.parser.EJBQL21Compiler.from_clause(EJBQL21Compiler.java:201)
> at
> org.tranql.ejb.parser.EJBQL21Compiler.ejbql(EJBQL21Compiler.java:115)
> at
> org.tranql.sql.EJBQLToPhysicalQuery.getEJBQLQuery(EJBQLToPhysicalQuery.java:233)
> ... 38 more
>
>
> So, basically, the ejbQL
> select distinct object(r) from Rasse as r, in (r.partei) as p order by
> p.parteiName asc,r.rassenName asc
> is wrong. However, the ejbQL
> select distinct object(r) from Rasse as r order by r.rassenName asc
> works.
>
> Does anyone know what "Path used must end with a multi valued CMR field"
> mean?
>
> Or is this somehow related to the prefetch system by Geronimo?
>
> Best regards
>
> Dirk
>