-->
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.  [ 2 posts ] 
Author Message
 Post subject: NullPointerException in getHibernateLazyInitializer:javassis
PostPosted: Wed Dec 10, 2008 2:35 pm 
Newbie

Joined: Mon Nov 21, 2005 8:47 am
Posts: 6
I'm not sure if this is a bug in Hibernate or a bug in javassist . I'm trying to isolate under exactly which circumstances this happens. Most of the time everything is OK but in 3 specific integration test classes I'm seeing the exception shown below.
It doesn't appear to be a race condition as it happens every time I run those tests.

It happens in Hibernate 3.2.6.ga and 3.3.1.GA with javassist 3.4.GA,3.7.1.GA,3.8.1.GA,3.9.0.GA
It seems similar to the following (but isn't fixed in 3.9.0):
http://www.jboss.com/index.html?module= ... 30#4115630
When I run it through the debugger it turns out that the proceed parameter passed in to DefaultMethodHandler.invoke is null.

Donnchadh


The exception is:
java.lang.NullPointerException
at javassist.util.proxy.RuntimeSupport$DefaultMethodHandler.invoke(RuntimeSupport.java:37)
at org.donnchadh.domainmodel.CharacterEncoding_$$_javassist_40.getHibernateLazyInitializer(CharacterEncoding_$$_javassist_40.java)
at org.hibernate.Hibernate.isInitialized(Hibernate.java:321)
at org.hibernate.engine.StatefulPersistenceContext.reassociateIfUninitializedProxy(StatefulPersistenceContext.java:482)
at org.hibernate.event.def.ProxyVisitor.processEntity(ProxyVisitor.java:27)
at org.hibernate.event.def.AbstractVisitor.processValue(AbstractVisitor.java:104)
at org.hibernate.event.def.WrapVisitor.processValue(WrapVisitor.java:98)
at org.hibernate.event.def.AbstractVisitor.processEntityPropertyValues(AbstractVisitor.java:55)
at org.hibernate.event.def.AbstractSaveEventListener.visitCollectionsBeforeSave(AbstractSaveEventListener.java:371)
at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:273)
at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:181)
at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:107)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:187)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:172)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:94)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)


Top
 Profile  
 
 Post subject: It was beanlib-hibernate
PostPosted: Thu Dec 11, 2008 12:05 pm 
Newbie

Joined: Mon Nov 21, 2005 8:47 am
Posts: 6
It turns out that we were using an old version of beanlib which didn't recognise javassist proxies


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.