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

Missing "import" doesn't always produce a compilation error in BPMN2 process

    XMLWordPrintable

    Details

    • Sprint:
      2018 Week 23-24
    • Steps to Reproduce:
      Hide

      1. Unzip reproducer.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" is required to reproduce the issue constantly with this reproducer (The default hashCode=5 seems to generate 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.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" is required to reproduce the issue constantly with this reproducer (The default hashCode=5 seems to generate 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"
    • Docs QE Status:
      NEW
    • QE Status:
      NEW

      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  swiderski.maciej Maciej Swiderski
                  Reporter:
                  tkobayashi Toshiya Kobayashi
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: