[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-6236?page=c...
]
Kaj Hejer edited comment on HHH-6236 at 11/24/11 5:38 AM:
----------------------------------------------------------
I see this issue with both 3.6.8.Final and Hibernate 4.0.0.CR6. We are using Spring
3.1.0.RC1. We use native hibernate, not JPA.
When adding the following relationship to our Lesson domainobject I see this issue.
{code}
@ManyToMany(fetch = FetchType.EAGER)
@JoinTable(name = "RESOURCES_LESSON", joinColumns = @JoinColumn(name =
"CODE_FS", referencedColumnName = "CODE_FS"), inverseJoinColumns =
@JoinColumn(name = "RESOURCES_ID", referencedColumnName
="RESOURCES_ID"))
private Set<Resource> resources = new HashSet<Resource>();
{code}
We see this issue when fetching a Lesson (which is the domainobject which has the
resources attribute shown above) in the following testcase:
{code}
@Test
public void resources() {
Lesson lesson = lessonDAO.findById("1234");
}
{code}
@Fabrice Daugan: Thanks for posting your comments! Since we see this issue in a
"clean" fetching of an object I don't think we have any non persisted
entities.
was (Author: kajh):
I see this issue with both 3.6.8.Final and Hibernate 4.0.0.CR6. We are using Spring
3.1.0.RC1. We use native hibernate, not JPA.
When adding the following relationship to our Lesson domainobject I see this issue.
{code}
@ManyToMany(fetch = FetchType.EAGER)
@JoinTable(name = "RESOURCES_LESSON", joinColumns = @JoinColumn(name =
"CODE_FS", referencedColumnName = "CODE_FS"), inverseJoinColumns =
@JoinColumn(name = "RESOURCES_ID", referencedColumnName
="RESOURCES_ID"))
private Set<Resource> resources = new HashSet<Resource>();
{code}
We see this issue when fetching a Lesson (which is the domainobject which has the
resources attribute shown above) in the following testcase:
{code}
@Test
public void resources() {
Lesson lesson = lessonDAO.findById("1234");
}
{code}
NullPointerException in org.hibernate.type.EntityType.isEqual
-------------------------------------------------------------
Key: HHH-6236
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-6236
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.6.4
Environment: Hibernate 3.6.4, MySQL 5.5.8, Linux x64
Reporter: Thomas Stinner
The following error does not occur every time, but in 75% of all program starts.
The error either occurs on one of the first queries to the database, or does not occur at
all.
We solve this issue by simply restarting the application and trying again. It also
happens with other applications, not only this one.
INFO | jvm 1 | 2011/05/19 10:43:19 | Caused by: java.lang.NullPointerException
INFO | jvm 1 | 2011/05/19 10:43:19 | at
org.hibernate.type.EntityType.isEqual(EntityType.java:344)
INFO | jvm 1 | 2011/05/19 10:43:19 | at
org.hibernate.type.ComponentType.isEqual(ComponentType.java:176)
INFO | jvm 1 | 2011/05/19 10:43:19 | at
org.hibernate.engine.CollectionKey.equals(CollectionKey.java:71)
INFO | jvm 1 | 2011/05/19 10:43:19 | at
java.util.HashMap.put(HashMap.java:376)
INFO | jvm 1 | 2011/05/19 10:43:19 | at
org.hibernate.engine.StatefulPersistenceContext.addCollection(StatefulPersistenceContext.java:820)
INFO | jvm 1 | 2011/05/19 10:43:19 | at
org.hibernate.engine.StatefulPersistenceContext.addUninitializedCollection(StatefulPersistenceContext.java:789)
INFO | jvm 1 | 2011/05/19 10:43:19 | at
org.hibernate.type.CollectionType.getCollection(CollectionType.java:643)
INFO | jvm 1 | 2011/05/19 10:43:19 | at
org.hibernate.type.CollectionType.resolveKey(CollectionType.java:431)
INFO | jvm 1 | 2011/05/19 10:43:19 | at
org.hibernate.type.CollectionType.resolve(CollectionType.java:425)
INFO | jvm 1 | 2011/05/19 10:43:19 | at
org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:139)
INFO | jvm 1 | 2011/05/19 10:43:19 | at
org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:982)
INFO | jvm 1 | 2011/05/19 10:43:19 | at
org.hibernate.loader.Loader.doQuery(Loader.java:857)
INFO | jvm 1 | 2011/05/19 10:43:19 | at
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
INFO | jvm 1 | 2011/05/19 10:43:19 | at
org.hibernate.loader.Loader.loadEntity(Loader.java:2037)
INFO | jvm 1 | 2011/05/19 10:43:19 | at
org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:86)
INFO | jvm 1 | 2011/05/19 10:43:19 | at
org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:76)
INFO | jvm 1 | 2011/05/19 10:43:19 | at
org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3293)
INFO | jvm 1 | 2011/05/19 10:43:19 | at
org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:496)
INFO | jvm 1 | 2011/05/19 10:43:19 | at
org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:477)
INFO | jvm 1 | 2011/05/19 10:43:19 | at
org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:227)
INFO | jvm 1 | 2011/05/19 10:43:19 | at
org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:285)
INFO | jvm 1 | 2011/05/19 10:43:19 | at
org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:152)
INFO | jvm 1 | 2011/05/19 10:43:19 | at
org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:1090)
INFO | jvm 1 | 2011/05/19 10:43:19 | at
org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:1038)
INFO | jvm 1 | 2011/05/19 10:43:19 | at
org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:630)
INFO | jvm 1 | 2011/05/19 10:43:19 | at
org.hibernate.type.EntityType.resolve(EntityType.java:438)
INFO | jvm 1 | 2011/05/19 10:43:19 | at
org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:139)
INFO | jvm 1 | 2011/05/19 10:43:19 | at
org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:982)
INFO | jvm 1 | 2011/05/19 10:43:19 | at
org.hibernate.loader.Loader.doQuery(Loader.java:857)
INFO | jvm 1 | 2011/05/19 10:43:19 | at
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
INFO | jvm 1 | 2011/05/19 10:43:19 | at
org.hibernate.loader.Loader.doList(Loader.java:2533)
INFO | jvm 1 | 2011/05/19 10:43:19 | at
org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276)
INFO | jvm 1 | 2011/05/19 10:43:19 | at
org.hibernate.loader.Loader.list(Loader.java:2271)
INFO | jvm 1 | 2011/05/19 10:43:19 | at
org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:452)
INFO | jvm 1 | 2011/05/19 10:43:19 | at
org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:363)
INFO | jvm 1 | 2011/05/19 10:43:19 | at
org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
INFO | jvm 1 | 2011/05/19 10:43:19 | at
org.hibernate.impl.SessionImpl.list(SessionImpl.java:1268)
INFO | jvm 1 | 2011/05/19 10:43:19 | at
org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
INFO | jvm 1 | 2011/05/19 10:43:19 | at
org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:246)
INFO | jvm 1 | 2011/05/19 10:43:19 | at
de.schuechen.tms.abrechnung.RechnungenErzeugen.ausRgVorschlag(RechnungenErzeugen.java:106)
INFO | jvm 1 | 2011/05/19 10:43:19 | at
de.schuechen.tms.abrechnung.RechnungenReporter.createJasperPrint(RechnungenReporter.java:136)
INFO | jvm 1 | 2011/05/19 10:43:19 | ... 5 more
STATUS | wrapper | 2011/05/19 10:43:22 | TERM trapped. Shutting down.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira