Uploaded image for project: 'Red Hat Process Automation Manager'
  1. Red Hat Process Automation Manager
  2. RHPAM-1212

[GSS] (7.0.z) Missing "import" doesn't always produce a compilation error in BPMN2 process

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 7.0.2.GA
    • 7.0.0.GA
    • jBPM Core
    • CR1
    • Hide

      1. Unzip reproducer-rhpam700.zip
      2. cd reproducer-class
      3. mvn clean install
      4. cd order-error-reproducer
      5. export MAVEN_OPTS="-XX:hashCode=0"
      6. mvn clean package
      7. Repeat step 6. You will see sometimes success, sometimes failure

      Note, with JDK 8, "-XX:hashCode=0" may be required to reproduce the issue constantly with this reproducer (The default hashCode=5 sometimes generates the same hashCode upon JVM restart so not good to check "different behaviour per test execution"). But this is not a fundamental factor of the issue. Users may add many BPMN2 files so they would hit this issue randomly even without "hashCode=0"

      Show
      1. Unzip reproducer-rhpam700.zip 2. cd reproducer-class 3. mvn clean install 4. cd order-error-reproducer 5. export MAVEN_OPTS="-XX:hashCode=0" 6. mvn clean package 7. Repeat step 6. You will see sometimes success, sometimes failure Note, with JDK 8, "-XX:hashCode=0" may be required to reproduce the issue constantly with this reproducer (The default hashCode=5 sometimes generates the same hashCode upon JVM restart so not good to check "different behaviour per test execution"). But this is not a fundamental factor of the issue. Users may add many BPMN2 files so they would hit this issue randomly even without "hashCode=0"

    Description

      When a kjar project has:

      • Process A has a correct import (e.g. "org.test.reproducer_class.App") and accesses to the class in its ScriptTask

      and

      • Process B misses the import and accesses to the class in its ScriptTask

      , kjar build results in sometimes success and sometimes failure. (depending on which process is compiled first, so depending on hashCode)

      Failure message is like this:

      [ERROR] Unable to build KieBaseModel:defaultKieBase
      Process Compilation error : Process org.drools.bpmn2.Hello World(com.sample.bpmn.hello2)
      	org/drools/bpmn2/Process_org$u46$drools$u46$bpmn2$u46$Hello_World353857208.java (9:398) : App cannot be resolved to a type
      	org/drools/bpmn2/Process_org$u46$drools$u46$bpmn2$u46$Hello_World353857208.java (9:412) : App cannot be resolved to a type
      
      
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 8.118 s
      [INFO] Finished at: 2018-06-11T14:42:43+09:00
      [INFO] Final Memory: 56M/831M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.kie:kie-maven-plugin:7.8.0-SNAPSHOT:build (default-build) on project order-error-reproducer: Execution default-build of goal org.kie:kie-maven-plugin:7.8.0-SNAPSHOT:build failed: Unable to get KieModule, Errors Existed: Error Messages:
      [ERROR] Message [id=1, kieBase=defaultKieBase, level=ERROR, path=home/tkobayas/support/02116981/work01/reproducer/order-error-reproducer/src/main/resources/com/sample/sample2.bpmn, line=-1, column=0
      [ERROR]    text=Process Compilation error App cannot be resolved to a type
      [ERROR] App cannot be resolved to a type]
      [ERROR] ---
      [ERROR] Warning Messages:
      [ERROR] ---
      [ERROR] Info Messages:
      

      An expectation is to always fail because Process B is wrong.

      Attachments

        Issue Links

          Activity

            People

              swiderski.maciej Maciej Swiderski (Inactive)
              rhn-support-tkobayas Toshiya Kobayashi
              Marian Macik Marian Macik
              Marian Macik Marian Macik
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: