Hi sudarshan_k,
Hibernate3
HQL inner join with composite key not anymore working in 3.1
Created: 10/Jan/06 10:27 AM Updated: 10/Jan/06 01:05 PM
Component/s: core
Affects Version/s: 3.1
Fix Version/s: None
Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Environment: Hibernate 3.1
JDK 1.4.2_03
Weblogic 8.1 SP3
Description
While migrating from hib 3.0.5 to 3.1 this error appear:
id is a composite key containing accessphonenumbers
10 janv. 11:49:00:ERROR (ErrorCounter.reportError) - illegal syntax near collection: id
10 janv. 11:49:00:ERROR (ErrorCounter.reportError) - illegal syntax near collection: id
10 janv. 11:49:00:ERROR (ErrorCounter.reportError) - illegal syntax near collection: id
10 janv. 11:49:00:ERROR (ErrorCounter.reportError) - illegal syntax near collection: id
10 janv. 11:49:00:ERROR (SessionFactoryImpl.<init>) - Error in named query: get.free.groupedphone.by_groupid
org.hibernate.QueryException: could not resolve property: accessphonenumbers of: com.x.y.common.db.hib.vo.fulfilment.Groupedphonenumbers [
select groups.groupid,phones
from com.x.y.common.db.hib.vo.fulfilment.Accessnumbergroups as groups
inner join groups.groupedphonenumbersSet.id.accessphonenumbers as phones
where phones.bridges=:bridge_id
and phones.accesstypes=:accesstype_id
and groups.groupid=:group_id
]
at org.hibernate.persister.entity.AbstractPropertyMapping.throwPropertyException(AbstractPropertyMapping.java:43)
at org.hibernate.persister.entity.AbstractPropertyMapping.toType(AbstractPropertyMapping.java:37)
at org.hibernate.persister.entity.AbstractEntityPersister.toType(AbstractEntityPersister.java:1265)
at org.hibernate.persister.collection.AbstractCollectionPersister.toType(AbstractCollectionPersister.java:1255)
at org.hibernate.hql.ast.tree.FromElementType.getPropertyType(FromElementType.java:278)
at org.hibernate.hql.ast.tree.FromElement.getPropertyType(FromElement.java:372)
at org.hibernate.hql.ast.tree.DotNode.getDataType(DotNode.java:528)
at org.hibernate.hql.ast.tree.DotNode.prepareLhs(DotNode.java:221)
at org.hibernate.hql.ast.tree.DotNode.resolve(DotNode.java:172)
at org.hibernate.hql.ast.tree.FromReferenceNode.resolve(FromReferenceNode.java:94)
at org.hibernate.hql.ast.HqlSqlWalker.createFromJoinElement(HqlSqlWalker.java:313)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.joinElement(HqlSqlBaseWalker.java:3258)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElement(HqlSqlBaseWalker.java:3050)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElementList(HqlSqlBaseWalker.java:2928)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromClause(HqlSqlBaseWalker.java:686)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:542)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:279)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:227)
at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:218)
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:158)
at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:105)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:74)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:53)
at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:71)
at org.hibernate.impl.SessionFactoryImpl.checkNamedQueries(SessionFactoryImpl.java:363)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:327)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1154)
at com.genesys.frameworks.db.hibernate_classic.GenStartup.buildHibernateSession(GenStartup.java:151)
at com.genesys.hermes.common.util.MainHibernateStartup.startHibernate(MainHibernateStartup.java:57)
at com.genesys.hermes.common.util.MainHibernateStartup.main(MainHibernateStartup.java:17)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at weblogic.j2ee.AppLifecycleListenerInternal.invokeMain(AppLifecycleListenerInternal.java:61)
at weblogic.j2ee.AppLifecycleListenerInternal.preStart(AppLifecycleListenerInternal.java:34)
at weblogic.j2ee.ListenerInvocationAction.run(ListenerInvocationAction.java:50)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.j2ee.J2EEApplicationContainer.notifySecureListener(J2EEApplicationContainer.java:4721)
at weblogic.j2ee.J2EEApplicationContainer.notify(J2EEApplicationContainer.java:4683)
at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1005)
at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.prepareContainer(SlaveDeployer.java:2444)
at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer(SlaveDeployer.java:2394)
at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2310)
at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:866)
at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:594)
at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:508)
at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
All Comments Work Log Change History Sort Order:
[ Permlink ]
Comment by Steve Ebersole [10/Jan/06 01:02 PM]
need a test case
[ Permlink ]
Comment by Steve Ebersole [10/Jan/06 01:05 PM]
Oh, actually is Accessnumbergroups.groupedphonenumbersSet a collection? If so, then Accessnumbergroups.groupedphonenumbersSet.id is *not* valid as a path expression. It was never a supported syntax and was accidentally allowed in earlier 3x releases.
_________________ Dharmendra Pandey
|