As described in some other threads, i'm currently migrating my project from Hibernate 3.2.6 to Hibernate 3.5.
I get the following exception:
Code:
java.lang.ClassCastException: cannot assign instance of org.hibernate.proxy.pojo.javassist.SerializableProxy to field org.jbpm.graph.exe.ProcessInstance.processDefinition of type org.jbpm.graph.def.ProcessDefinition in instance of org.jbpm.graph.exe.ProcessInstance
it occurs when i'm tryin to recieve some objects from the db. The ProcessInstace Class is mapped like this:
Code:
...
<set name="processInstances" table="VORGANG_PROCESS_INST" lazy="true">
<key column="VORGANG_ID"/>
<many-to-many
class="org.jbpm.graph.exe.ProcessInstance"
column="PROCESS_INST_ID" />
</set>
...
edit:
--
the code, that throws the exception is this one:
Code:
...
Criteria crit = dbSession.createCriteria(clazz);
return crit.list(); <---
...
--
if i change the value of "lazy" to "false" here, i wont get that exception anymore.
Anybody could tell me the why this happens? ((edit: forget this!)with 3.2.6. it all works fine)