]
Alejandro Guizar updated JBPM-2692:
-----------------------------------
Fix Version/s: jBPM 3.2.x
Still problems with variables of Serializable objects
-----------------------------------------------------
Key: JBPM-2692
URL:
https://jira.jboss.org/browse/JBPM-2692
Project: jBPM
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Runtime Engine
Affects Versions: jBPM 3.2.6.SP1, jBPM 3.2.7
Environment: jBPM 3.2.6.SP1 embedded into a web application
Reporter: Mauro Molinari
Fix For: jBPM 3.2.x
Attachments: Patch per JBTM-2692.patch, patch_for_JBPM-2692.txt
There are times in which when calling org.jbpm.context.exe.VariableInstance.getValue(),
the proprty token is null. In this case, if the variable object is of a Serializable class
and this class is in the PAR, calling getValue() will fail with a ClassNotFound exception
if the process class loader is not the one who loaded the SerializableToByteArrayConverter
class. This is because the method
org.jbpm.context.exe.converter.SerializableToByteArrayConverter.revert(ByteArray) (without
the token) is called and a plain ObjectInputStream is used to do the deserialization.
I don't have a simple test case to reproduce, but this is what I am doing:
- my webapp application is retreiving all the logs associated to a ProcessInstance using
org.jbpm.db.LoggingSession.findLogsByProcessInstance(long)
- it is iterating over the collection and, for each ProcessLog instance, it is retreiving
the variable instance values (for example: org.jbpm.context.log.VariableCreateLog the
method org.jbpm.context.log.VariableLog.getVariableInstance() is called; for a
org.jbpm.context.log.VariableUpdateLog the methods
org.jbpm.context.log.VariableUpdateLog.getOldValue() and
org.jbpm.context.log.VariableUpdateLog.getNewValue() are called and so on)
- a ClassNotFoundException is launched; the class loader in use is that of the webapp, so
it's normal that the class of the variable value cannot be found, since it is a
serializable class provided by the PAR.
I don't know why token is null: should it be restored by Hibernate? Looking at
org.jbpm.context.exe.VariableInstance the only explicit code that sets the token property
is in org.jbpm.context.exe.VariableInstance.create(Token, String, Object).
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: