ClassCastException « Composite « JPA Q&A





1. Getting ClassCastException from hibernate composite id    forum.hibernate.org

Hi, I have a table with primary composite key - ... POJO Class for the component SegmentsVersionsId is as follows - public class SegmentsVersionsId implements Serializable { static final long serialVersionUID = 123123; private long segmentid; private ...

2. ClassCastException inserting a composite-element    forum.hibernate.org

Newbie Joined: Fri Sep 02, 2011 10:37 pm Posts: 3 When I attempt to save an object containing a of s, I get the following ClassCastException: Quote: java.lang.Long cannot be cast to java.lang.Integer java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer at org.hibernate.type.descriptor.java.IntegerTypeDescriptor.unwrap(IntegerTypeDescriptor.java:36) at org.hibernate.type.descriptor.sql.IntegerTypeDescriptor$1.doBind(IntegerTypeDescriptor.java:52) at org.hibernate.type.descriptor.sql.BasicBinder.bind(BasicBinder.java:91) at org.hibernate.type.AbstractStandardBasicType.nullSafeSet(AbstractStandardBasicType.java:282) at org.hibernate.type.AbstractStandardBasicType.nullSafeSet(AbstractStandardBasicType.java:277) at org.hibernate.type.ComponentType.nullSafeSet(ComponentType.java:340) at org.hibernate.persister.collection.AbstractCollectionPersister.writeElement(AbstractCollectionPersister.java:815) at org.hibernate.persister.collection.AbstractCollectionPersister.recreate(AbstractCollectionPersister.java:1203) at org.hibernate.action.CollectionRecreateAction.execute(CollectionRecreateAction.java:58) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273) ...

3. ClassCastException initializing Set w/ Date in composite-id    forum.hibernate.org

I can't find anything on this (maybe didn't look in the right places) so here's the problem I'm having: I've got a couple classes mapped like so (abreviated for brevity): Code: ...

4. composite-id and java.lang.ClassCastException    forum.hibernate.org

Hibernate version: Hibernate 3 Current CVS Mapping documents: Code between sessionFactory.openSession() and session.close(): Object temp = session.get(Zeiteinheit.class, new BigDecimal(1)); ze = (Zeiteinheit)temp; Full stack trace of any exception that occurs: org.hibernate.PropertyAccessException: exception ...

5. java.lang.ClassCastException using class with composite id    forum.hibernate.org

Need help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp Hibernate version:3.0.5 Mapping documents: Code: ...

6. composite-id classcastexception    forum.hibernate.org

Newbie Joined: Tue Jul 11, 2006 12:09 pm Posts: 7 Hey all, I have spent lots of time trying to figure this out with no luck, any help would be appreciated. I am getting a ClassCastException when trying to run this query yet, I have checked the getters and setters and they seem fine to me.. maybe I just need a ...