Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-2158

ClassCastException when start a processDeifinition which is not in the RepositoryCache.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • jBPM 4.0.0.Beta2
    • jBPM 4.0.0.Beta1
    • Runtime Engine
    • None

      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.

              tom.baeyens Tom Baeyens (Inactive)
              xuhuisheng_jira Huisheng Xu (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: