[
https://jira.jboss.org/jira/browse/JBPM-2692?page=com.atlassian.jira.plug...
]
Mauro Molinari commented on JBPM-2692:
--------------------------------------
The problem is that the log entries related to that variable as still referencing it. For
instance, there will be the log entry that says that the given variable was created. The
value given when created is still accessible, but it cannot be deserialized because of the
mentioned problem.
Still problems with variables of Serializable objects
-----------------------------------------------------
Key: JBPM-2692
URL:
https://jira.jboss.org/jira/browse/JBPM-2692
Project: jBPM
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Runtime Engine
Affects Versions: jBPM 3.2.6.SP1
Environment: jBPM 3.2.6.SP1 embedded into a web application
Reporter: Mauro Molinari
Attachments: 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.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira