[jboss-user] [jBPM Users] - Re: deploy examples error, classcastexception
LMarinkov
do-not-reply at jboss.com
Fri Oct 9 08:50:04 EDT 2009
Envoronment:
windows vista
apache-tomcat-6.0.20
jbpm 4.1
hsqldb
If one replaces the line 64 in the org.jbpm.pvm.internal.repository.ProcessDeployer:
List<ProcessDefinitionImpl> processDefinitions = (List<ProcessDefinitionImpl>) parse.getDocumentObject();
with the following code then the deployment of the processes from the jbpm examples under the jbpm console will be successful:
List<ProcessDefinitionImpl> processDefinitions = new java.util.ArrayList<ProcessDefinitionImpl>();
| Object obj = parse.getDocumentObject();
| if (obj instanceof java.util.ArrayList)
| {
| processDefinitions = (List<ProcessDefinitionImpl>)obj;
| }
| else
| {
| processDefinitions.add((ProcessDefinitionImpl)obj);
| }
|
I' am not advocating this code as a solution for the class cast exception, but my opinion on class casting in java is that it brings more problems then it solves! I will suggest that the author of this cast should look again at the code and try to solve the problem without using class casting.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4259623#4259623
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4259623
More information about the jboss-user
mailing list