-->
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.  [ 3 posts ] 
Author Message
 Post subject: at org.hibernate.type.AbstractType.getHashCode(AbstractType.
PostPosted: Fri Apr 27, 2007 8:17 pm 
Newbie

Joined: Thu Mar 02, 2006 12:23 pm
Posts: 2
Does anyone knows what does this error possible mean ?



java.lang.NullPointerException
at org.hibernate.type.AbstractType.getHashCode(AbstractType.java:112)
at org.hibernate.type.AbstractType.getHashCode(AbstractType.java:120)
at org.hibernate.type.EntityType.getHashCode(EntityType.java:402)
at org.hibernate.type.ComponentType.getHashCode(ComponentType.java:162)
at org.hibernate.engine.EntityKey.generateHashCode(EntityKey.java:103)
at org.hibernate.engine.EntityKey.<init>(EntityKey.java:47)
at org.hibernate.event.def.AbstractSaveEventListener.performSave(Abstrac
tSaveEventListener.java:147)
at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId
(AbstractSaveEventListener.java:114)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGene
ratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:186)
at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrR
equestedId(DefaultSaveEventListener.java:33)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTran
sient(DefaultSaveOrUpdateEventListener.java:175)
at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(
DefaultSaveEventListener.java:27)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpda
te(DefaultSaveOrUpdateEventListener.java:70)
at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:530)
at org.hibernate.impl.SessionImpl.save(SessionImpl.java:518)
at org.hibernate.impl.SessionImpl.save(SessionImpl.java:514)
at org.springframework.orm.hibernate3.HibernateTemplate$12.doInHibernate
(HibernateTemplate.java:617)
at org.springframework.orm.hibernate3.HibernateTemplate.execute(Hibernat
eTemplate.java:366)
at org.springframework.orm.hibernate3.HibernateTemplate.save(HibernateTe
mplate.java:614)


when i try to save in my test



ContratoEjecutivo cEj = new ContratoEjecutivo(pojo,48,"EVA00", 1, "AC",new Date());

getHibernateTemplate().save(cEj);


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 28, 2007 8:57 am 
Senior
Senior

Joined: Sat Apr 21, 2007 11:01 pm
Posts: 144
What is pojo = ?

_________________
Everytime you get an answer to your question without giving credit; god kills a kitten. :(


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 28, 2007 9:35 am 
Senior
Senior

Joined: Tue Mar 09, 2004 2:38 pm
Posts: 141
Location: Lowell, MA USA
It looks like you have a custom UserType and you have either not implemented equals() & hashCode() or you have an case in which one of the properties in your equals() & hashCode() methods is null.

Ryan-

_________________
Ryan J. McDonough
http://damnhandy.com

Please remember to rate!


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