[
http://jira.jboss.com/jira/browse/JBPM-1024?page=comments#action_12414817 ]
Bernd Ruecker commented on JBPM-1024:
-------------------------------------
Yeah, I can reproduce the error on the web-console i the class is not on the classpath but
just deployed in the jbpm tables via the process archive. The error occurs here:
public Object revert(Object o) {
ByteArray byteArray = (ByteArray) o;
try {
ByteArrayInputStream bais = new ByteArrayInputStream(byteArray.getBytes());
ObjectInputStream ois = new ObjectInputStream(bais);
return ois.readObject();
} catch (Exception e) {
throw new JbpmException("couldn't deserialize object", e);
}
}
Here the Stacktrace:
java.lang.ClassNotFoundException: org.acme.insurance.Driver
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:604)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
at
org.jbpm.context.exe.converter.SerializableToByteArrayConverter.revert(SerializableToByteArrayConverter.java:64)
at org.jbpm.context.exe.VariableInstance.getValue(VariableInstance.java:147)
at
org.jbpm.context.exe.VariableContainer.getVariablesLocally(VariableContainer.java:125)
at org.jbpm.context.exe.VariableContainer.getVariables(VariableContainer.java:109)
at
org.jbpm.jsf.core.action.GetVariableMapActionListener.handleAction(GetVariableMapActionListener.java:49)
at
org.jbpm.jsf.core.impl.JbpmActionListenerWrapper.processAction(JbpmActionListenerWrapper.java:82)
...
So the problem seems to occur if you deploy your business object classes only with jbpm.
This should be not the normal case, the business classes should be deployed in other ways
in my eyes.
But I am thinking if it would be nice to fix it. That would be possible by using a
classloader like the Delegation does, but in the Converter, we don't know the process
definition... Hmm, any thought on that?
Here how the classloader is retrieved in the Delegation:
// find the classloader to use
ClassLoader classLoader = ClassLoaderUtil.getProcessClassLoader(processDefinition);
Serializable variables are not being deserialized when retrieved from
process
-----------------------------------------------------------------------------
Key: JBPM-1024
URL:
http://jira.jboss.com/jira/browse/JBPM-1024
Project: JBoss jBPM
Issue Type: Bug
Components: Core Engine
Affects Versions: jBPM 3.1.4
Reporter: thilker
Assigned To: Tom Baeyens
Storing an serializable object in a process should write an "R" in the column
"converter" in table JBPM_VARIABLEINSTANCE.
But the value of the field is "null".
The cause:
The converter ID is retrieved in class org.jbpm.db.hibernate.Converter at line 63.
For the case of the SerializableToByteArrayConverter the ID is "null".
Regards,
Thorsten
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira