ClassCastException « Update « JPA Q&A





1. Broken Hibernate Save Method    stackoverflow.com

I have the following method in my Java application's DAO layer:

public void save(Employee emp) {
     System.out.println("emp type: " + emp.getClass().getName);
     getHibernateTemplate().save(emp);
   ...

2. ClassCastException after update to 3.5.    forum.hibernate.org

...

4. classcastexception saving xml node with a set    forum.hibernate.org

hi there, i cannot get the dom4jsession to load/import xml file into my database. Hibernate version: 3 i have a class user that has a collection of roles. i have an xml file with a bunch of users in it like this: admin adminFirst adminLast sof admin manager Session session = HibernateUtil.currentSession(); Session dom4jSession = session.getSession(EntityMode.DOM4J); ...

5. ClassCastException when performing saveOrUpdate on a detache    forum.hibernate.org

Author Message n8thesk8 Post subject: ClassCastException when performing saveOrUpdate on a detache Posted: Tue Jan 24, 2006 6:08 pm Newbie Joined: Fri Jun 24, 2005 10:40 am Posts: 17 I am building an admin application to configure a tree of data when I take a node in the tree change its effective dates and send it back to our ...

6. StringType ClassCastException during merge()    forum.hibernate.org

I'd like help with this obscure error. I have solved it, but am not sure why the error occurred - I'm also sure that hibernate should give a more meaningful error in this case anyway! The solution is documented as a second post to this one. Thanks in advance. Hibernate version: 3.0.5 Mapping documents: I'm not including all (they're huge) but ...

7. ClassCastException when calling saveOrUpdate()    forum.hibernate.org

Author Message drgarp Post subject: ClassCastException when calling saveOrUpdate() Posted: Thu Mar 08, 2007 3:46 am Newbie Joined: Sun Nov 26, 2006 10:38 pm Posts: 1 Hi all, I'm stuck and I can not figure out what is going on. I have a mapping that includes a many-to-one relationship and a one-to-many relationship. When I go to save the ...

8. Bizarre ClassCastException When Attempting to Persist    forum.hibernate.org

I am building a Seam-JPA app powered by Hibernate, and I am attempting to unit test a class whose role it is to persist JPA entities. The class is your typical Order class, and it contains a 1:M mapping to an Item entity represented internally as a HashMap (for reasons relating to the characteristics of the feature) but converted to an ...