-->
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: NullPointer in GregorianCalendar.clone() when persisting
PostPosted: Thu Mar 09, 2006 6:07 am 
Newbie

Joined: Thu Mar 09, 2006 4:59 am
Posts: 2
I'm getting the following exception when trying to persist a newly created entity using EJB3 RC5 in JBoss 4.0.3SP1 with jdk 1.5.0_06 running on Linux. After looking quickly at the code I don't see how GregorianCaleander can get in such a state, and I'm not proficient enough in Hibernate inner workings to understand what's the acctual cause.

Caused by: java.lang.NullPointerException
at java.util.GregorianCalendar.clone(GregorianCalendar.java:1864)
at org.hibernate.type.CalendarType.deepCopyNotNull(CalendarType.java:68)
at org.hibernate.type.MutableType.deepCopy(MutableType.java:25)
at org.hibernate.type.TypeFactory.deepCopy(TypeFactory.java:323)
at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:255)
at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:167)
at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:101)
at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:131)
at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:87)
at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:38)
at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:642)
at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:616)
at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:620)
at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:127)
at org.jboss.ejb3.entity.InjectedEntityManager.persist(InjectedEntityManager.java:141)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 10, 2006 2:51 am 
Newbie

Joined: Thu Mar 09, 2006 4:59 am
Posts: 2
Found the cause of this to be a bug in the current JDK, and for my case a session bean relation that was remote when it should be local. See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6358365 for details.


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.