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

Classname collision in dynamically generated Java code

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • jBPM 5.1
    • None
    • None
    • None

      When multiple rule flow files are coded in the same package it's possible for actions coded in the Java dialect to be placed in the same dynamically generated java classes. We found cases where a NoSuchMethodError occurs at runtime because of a discrepancy between the number of actions available and Action Invokers generated when two flows in the same package have a different number of actions.

      This appears to be and issue with the interaction between JavaDialect.getUniqueLegalName and ProcessBuilder.buildProcess where the ProcessBuilder provides JavaDialect with only the package name.

      Altering ProcessBuilder:124 from
      processDescr.setName(process.getPackageName());

      to
      processDescr.setName(process.getPackageName()+"."+process.getName());

      results in a unique name for the generated java classes.

              kverlaen@redhat.com Kris Verlaenen
              hamilts2 Simon Hamilton (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: