ClassCastException when start a processDeifinition which is not in the RepositoryCache.
---------------------------------------------------------------------------------------
Key: JBPM-2158
URL:
https://jira.jboss.org/jira/browse/JBPM-2158
Project: JBoss jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Runtime Engine
Affects Versions: jBPM 4.0.0.Beta1
Reporter: Xu Huisheng
Fix For: jBPM 4.0.0.Beta2
I am happy to see that jBPM-4.0.0.Beta1 have released, but when I deploy a process, then
shutdown the jetty, then restart again. At this time I want to start a process which is
already deployed. Then I got a ClassCastException.
I see the JpdlDeployer and get the follow codes:
if (deployment.hasObjectProperties(processDefinitionName)) {
String key = (String) deployment.getObjectProperty(processDefinitionName,
KEY_KEY);
String id = (String) deployment.getObjectProperty(processDefinitionName,
KEY_ID);
String version = (String) deployment.getObjectProperty(processDefinitionName,
KEY_VERSION);
processDefinition.setId(id);
processDefinition.setKey(key);
processDefinition.setVersion(Integer.parseInt(version));
} else {
checkKey(processDefinition, deployment);
checkVersion(processDefinition, deployment);
checkId(processDefinition, deployment);
deployment.addObjectProperty(processDefinitionName, KEY_KEY,
processDefinition.getKey());
deployment.addObjectProperty(processDefinitionName, KEY_VERSION, new
Long(processDefinition.getVersion()));
deployment.addObjectProperty(processDefinitionName, KEY_ID,
processDefinition.getId());
}
The version in the line " String version = (String)
deployment.getObjectProperty(processDefinitionName, KEY_VERSION);" should be Long,
because when there is no ObjectProperties in the deployment, it set a new
Long(processDefinition.getVersion()) to the deployement.
I checkout the trunk code, it has the same problem.
Thank you.
--
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