3.0.5
This was hard to debug...
In the mapping I have a class who's primary key is an Integer. In the code I loaded the class (Status) by giving it a Long. (Obviously this is wrong, but someone used Long by mistake, the class loaded fine)
When I would set Status onto Member and session.save(Member) I get the following exception.
It was hard to debug this because it did not say with what class or any information to point to what I found. (I debugged it by flushing everything after each statement and took it from there)
Now, I'm wondering if this is just an inconsistency or what. Because if you are allowed to load a class via a Long then you should be able to save that way. Yes?
2005-07-07 11:53:56,134 ERROR com.lsr.swing.moat.MOAT - rollback
java.lang.ClassCastException at org.hibernate.type.IntegerType.set(IntegerType.java:39) at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:62) at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:39) at org.hibernate.type.ManyToOneType.nullSafeSet(ManyToOneType.java:63) at org.hibernate.persister.entity.BasicEntityPersister.dehydrate(BasicEntityPersister.java:1617) at org.hibernate.persister.entity.BasicEntityPersister.dehydrate(BasicEntityPersister.java:1594) at org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:1850) at org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:2200) at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:46) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:239) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:223) at org.hibernate.engine.ActionQueue.executeInserts(ActionQueue.java:127) at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:196) at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:160) at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:95) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:184) at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:33) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:173) at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:27) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:69) at org.hibernate.impl.SessionImpl.save(SessionImpl.java:481) at org.hibernate.impl.SessionImpl.save(SessionImpl.java:476) at com.lsr.framework.panel.database.dao.PanelistDAO.persistPanelist(PanelistDAO.java:107) at com.lsr.framework.panel.database.dao.PanelistDAO.uploadPanelist(PanelistDAO.java:75) at com.lsr.swing.moat.MOAT$35.run(MOAT.java:841) at java.lang.Thread.run(Thread.java:534)
|