-->
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.  [ 1 post ] 
Author Message
 Post subject: NullPointerException in getHibernateLazyInitializer
PostPosted: Fri Nov 29, 2013 10:16 am 
Newbie

Joined: Fri Nov 29, 2013 10:04 am
Posts: 1
Hi,

I'm experiencing the following exception:

Code:
java.lang.NullPointerException
        at javassist.util.proxy.RuntimeSupport$DefaultMethodHandler.invoke(RuntimeSupport.java:38)
        at com.Customer_$$_javassist_1.getHibernateLazyInitializer(Customer_$$_javassist_1.java)
        at org.hibernate.Hibernate.isInitialized(Hibernate.java:429)
        at org.hibernate.engine.StatefulPersistenceContext.reassociateIfUninitializedProxy(StatefulPersistenceContext.java:530)
        at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.reassociateIfUninitializedProxy(DefaultSaveOrUpdateEventListener.java:99)
        at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:82)
        at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:685)
        at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:677)
        at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:673)
        at org.springframework.orm.hibernate3.HibernateTemplate$16.doInHibernate(HibernateTemplate.java:740)
        at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406)
        at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
        at org.springframework.orm.hibernate3.HibernateTemplate.saveOrUpdate(HibernateTemplate.java:737)
        at com.HibernateCustomerService.create(HibernateCustomerService.java:31)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
        at sun.proxy.$Proxy62.create(Unknown Source)


This tends to happen shortly after application startup under moderate/high load. Further Instantiation of the com.Customer class fail with the same exception so the application
is effectively broken until we restart.

I've traced through the code and can't see how the DefaultMethodHandler would ever be invoked in theCustomer_$$_javassist_1 since it's set in the JavassistLazyInitializer.

This is on Hibernate 3.6.8-Final with javassist 3.16.1

Has anyone seen this before? Is there any workaround possible?

Thanks


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

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.