[
https://hibernate.onjira.com/browse/HHH-7178?page=com.atlassian.jira.plug...
]
Marc commented on HHH-7178:
---------------------------
Additional info, here's the stacktrace:
15-Mar-2012 9:04:10 AM org.hibernate.AssertionFailure <init>
ERROR: HHH000099: an assertion failure occured (this may indicate a bug in Hibernate, but
is more likely due to unsafe use of the session): org.hibernate.AssertionFailure: null
identifier
Exception in thread "main" org.hibernate.AssertionFailure: null identifier
at org.hibernate.engine.spi.EntityKey.<init>(EntityKey.java:69)
at
org.hibernate.internal.AbstractSessionImpl.generateEntityKey(AbstractSessionImpl.java:240)
at org.hibernate.loader.Loader.extractKeysFromResultSet(Loader.java:722)
at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:635)
at org.hibernate.loader.Loader.doQuery(Loader.java:856)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:289)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
at org.hibernate.loader.Loader.loadEntity(Loader.java:2058)
at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:82)
at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:72)
at
org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3697)
at
org.hibernate.event.internal.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:439)
at
org.hibernate.event.internal.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:420)
at
org.hibernate.event.internal.DefaultLoadEventListener.load(DefaultLoadEventListener.java:204)
at
org.hibernate.event.internal.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:251)
at
org.hibernate.event.internal.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:148)
at org.hibernate.internal.SessionImpl.fireLoad(SessionImpl.java:954)
at org.hibernate.internal.SessionImpl.internalLoad(SessionImpl.java:903)
at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:610)
at org.hibernate.type.EntityType.resolve(EntityType.java:438)
at org.hibernate.engine.internal.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:150)
at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:1006)
at org.hibernate.loader.Loader.doQuery(Loader.java:883)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:289)
at org.hibernate.loader.Loader.doList(Loader.java:2463)
at org.hibernate.loader.Loader.doList(Loader.java:2449)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2279)
at org.hibernate.loader.Loader.list(Loader.java:2274)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:470)
at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:355)
at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:196)
at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1115)
at org.hibernate.internal.QueryImpl.list(QueryImpl.java:101)
at org.hibernate.ejb.QueryImpl.getSingleResult(QueryImpl.java:280)
at test.nocommit.Tester.findEntity(Tester.java:38)
at test.nocommit.Tester.main(Tester.java:17)
Null Identifier for maps.....dependent on variable name
-------------------------------------------------------
Key: HHH-7178
URL:
https://hibernate.onjira.com/browse/HHH-7178
Project: Hibernate ORM
Issue Type: Bug
Components: core
Affects Versions: 4.0.1
Environment: Oracle10g
Reporter: Marc
Attachments: HibernateJIRA.zip
When querying for a class which contains a self-reference and a Map whose values contain
a composite primary key, a null identifier exception is thrown. It seems to be somehow
related to the variable name because when I change MyEntity.secConfigs to
MyEntity.ecConfigs and change the setters/getters appropriately, the problem no longer
exists. I believe the problem is also related to the composite primary key for
ContainedEntity because when I change it to use an auto-generated long the problem also
goes away.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira