-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: NullPointerException org.hibernate.type.EntityType.isEqual
PostPosted: Thu Apr 28, 2011 7:39 am 
Newbie

Joined: Wed Jul 19, 2006 4:13 am
Posts: 6
We are using the following:

hibernate-c3p0-3.6.3.Final.jar
hibernate-commons-annotations-3.2.0.Final.jar
hibernate-core-3.6.3.Final.jar
hibernate-entitymanager-3.6.3.Final.jar
hibernate-jpa-2.0-api-1.0.0.Final.jar
mysql-connector-java-5.1.12.jar
MySQL Server 5.5.9

Sometimes, when starting our application we get a NullpointerException. This always happens at the very beginning, after executing one of the first queries. To solve the problem it is usually sufficient to start the program again. Sometimes it is necessary to do this multiple times.

Any idea what might cause these trouble? I think they started when we upgraded from Hibernate 3.3 to Hibernate 3.6.

Code:
INFO   | jvm 1    | 2011/04/28 13:23:46 | java.lang.NullPointerException
INFO   | jvm 1    | 2011/04/28 13:23:46 |       at org.hibernate.type.EntityType.isEqual(EntityType.java:344)
INFO   | jvm 1    | 2011/04/28 13:23:46 |       at org.hibernate.type.ComponentType.isEqual(ComponentType.java:176)
INFO   | jvm 1    | 2011/04/28 13:23:46 |       at org.hibernate.engine.CollectionKey.equals(CollectionKey.java:71)
INFO   | jvm 1    | 2011/04/28 13:23:46 |       at java.util.HashMap.put(HashMap.java:376)
INFO   | jvm 1    | 2011/04/28 13:23:46 |       at org.hibernate.engine.StatefulPersistenceContext.addCollection(StatefulPersistenceContext.java:820)
INFO   | jvm 1    | 2011/04/28 13:23:46 |       at org.hibernate.engine.StatefulPersistenceContext.addUninitializedCollection(StatefulPersistenceContext.java:789)
INFO   | jvm 1    | 2011/04/28 13:23:46 |       at org.hibernate.type.CollectionType.getCollection(CollectionType.java:643)
INFO   | jvm 1    | 2011/04/28 13:23:46 |       at org.hibernate.type.CollectionType.resolveKey(CollectionType.java:431)
INFO   | jvm 1    | 2011/04/28 13:23:46 |       at org.hibernate.type.CollectionType.resolve(CollectionType.java:425)
INFO   | jvm 1    | 2011/04/28 13:23:46 |       at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:139)
INFO   | jvm 1    | 2011/04/28 13:23:46 |       at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:982)
INFO   | jvm 1    | 2011/04/28 13:23:46 |       at org.hibernate.loader.Loader.doQuery(Loader.java:857)
INFO   | jvm 1    | 2011/04/28 13:23:46 |       at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
INFO   | jvm 1    | 2011/04/28 13:23:46 |       at org.hibernate.loader.Loader.loadEntity(Loader.java:2037)
INFO   | jvm 1    | 2011/04/28 13:23:46 |       at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:86)
INFO   | jvm 1    | 2011/04/28 13:23:46 |       at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:76)
INFO   | jvm 1    | 2011/04/28 13:23:46 |       at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3293)
INFO   | jvm 1    | 2011/04/28 13:23:46 |       at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:496)
INFO   | jvm 1    | 2011/04/28 13:23:46 |       at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:477)
INFO   | jvm 1    | 2011/04/28 13:23:46 |       at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:227)
INFO   | jvm 1    | 2011/04/28 13:23:46 |       at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:285)
INFO   | jvm 1    | 2011/04/28 13:23:46 |       at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:152)
INFO   | jvm 1    | 2011/04/28 13:23:46 |       at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:1090)
INFO   | jvm 1    | 2011/04/28 13:23:46 |       at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:1038)
INFO   | jvm 1    | 2011/04/28 13:23:46 |       at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:630)
INFO   | jvm 1    | 2011/04/28 13:23:46 |       at org.hibernate.type.EntityType.resolve(EntityType.java:438)
INFO   | jvm 1    | 2011/04/28 13:23:46 |       at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:139)
INFO   | jvm 1    | 2011/04/28 13:23:46 |       at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:982)
INFO   | jvm 1    | 2011/04/28 13:23:46 |       at org.hibernate.loader.Loader.doQuery(Loader.java:857)
INFO   | jvm 1    | 2011/04/28 13:23:46 |       at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
INFO   | jvm 1    | 2011/04/28 13:23:46 |       at org.hibernate.loader.Loader.doList(Loader.java:2533)
INFO   | jvm 1    | 2011/04/28 13:23:46 |       at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276)
INFO   | jvm 1    | 2011/04/28 13:23:46 |       at org.hibernate.loader.Loader.list(Loader.java:2271)
INFO   | jvm 1    | 2011/04/28 13:23:46 |       at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:452)
INFO   | jvm 1    | 2011/04/28 13:23:46 |       at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:363)
INFO   | jvm 1    | 2011/04/28 13:23:46 |       at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
INFO   | jvm 1    | 2011/04/28 13:23:46 |       at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1268)
INFO   | jvm 1    | 2011/04/28 13:23:46 |       at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
INFO   | jvm 1    | 2011/04/28 13:23:46 |       at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:246)
INFO   | jvm 1    | 2011/04/28 13:23:46 |       at de.schuechen.tms.abrechnung.RechnungenErzeugen.ausRgVorschlag(RechnungenErzeugen.java:102)
INFO   | jvm 1    | 2011/04/28 13:23:46 |       at de.schuechen.tms.abrechnung.RechnungenReporter.createJasperPrint(RechnungenReporter.java:138)
INFO   | jvm 1    | 2011/04/28 13:23:46 |       at de.schuechen.tms.abrechnung.RechnungenReporter.createJasperPrint(RechnungenReporter.java:86)
INFO   | jvm 1    | 2011/04/28 13:23:46 |       at de.schuechen.reportmanager.ReportManager.runReport(ReportManager.java:211)
INFO   | jvm 1    | 2011/04/28 13:23:46 |       at de.schuechen.reportmanager.ReportManager.run(ReportManager.java:174)
INFO   | jvm 1    | 2011/04/28 13:23:46 |       at java.lang.Thread.run(Thread.java:662)


Top
 Profile  
 
 Post subject: Re: NullPointerException org.hibernate.type.EntityType.isEqual
PostPosted: Tue Sep 20, 2011 12:50 pm 
Newbie

Joined: Mon Nov 08, 2010 11:55 am
Posts: 2
We're witnessing the same issue when upgrading from 3.3.1 to 3.6.5 (3.6.7 doesn't fix it, either). The NPE is on a collection that throws a Javassist exception in debug. But when we restart Tomcat (without redeploying... just stop/wait/start) everything works as it is supposed to.

It feels like a out-of-memory issue during Hibernate's initialization, because when we allocate more RAM to permgen the issue doesn't appear nearly as often (though it still occasionally rears its head). This also would explain why restarting Tomcat without a full redeploy seems to fix the issue: if you don't clear the work, conf/Catalina and deploy, Tomcat doesn't need as much memory when it starts up. Force a full reset by clearing those directories, and the issue once again appears.


Top
 Profile  
 
 Post subject: Re: NullPointerException org.hibernate.type.EntityType.isEqual
PostPosted: Thu Nov 24, 2011 7:44 am 
Beginner
Beginner

Joined: Tue Aug 16, 2005 3:44 pm
Posts: 33
Hi!

We see this issue both with Hibernate 3.6.8.Final and 4.0.0.CR6.

Please also see issue HHH-6236: https://hibernate.onjira.com/browse/HHH-6236


-Kaj :)


Top
 Profile  
 
 Post subject: Re: NullPointerException org.hibernate.type.EntityType.isEqual
PostPosted: Thu Dec 15, 2011 4:20 am 
Beginner
Beginner

Joined: Tue Aug 16, 2005 3:44 pm
Posts: 33
kajh wrote:
We see this issue both with Hibernate 3.6.8.Final and 4.0.0.CR6.

Please also see issue HHH-6236: https://hibernate.onjira.com/browse/HHH-6236


Anyone else seeing this?

Has anyone found a workaround for this issue?

Thanks!

-Kaj :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.