I'm having problems serializing DB objects with XStream with the error "
XStream conversion exception: Cannot handle CGLIB enhanced proxies with multiple callbacks".
Now I found lot's of similar problems and solutions in the net but none exactly in my situation.
My code is something like this:
Code:
Class<?> clazz = resources.get("/"+entity);
(1) List<Object> all = getHibernateTemplate().loadAll(clazz);
String key = "somekey";
(2) Object object = getHibernateTemplate().get(clazz, key);
(3) object = getHibernateTemplate().load(clazz, key);
Now (1) and (2) are not giving me any problem, but (3) is giving that CGLIB errors. All of the situations I found googling are related to the use of hibernate collections/java collections, but in my case there is no collections, just a simple table with no relations.
Any help?
Cheers.