Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-6918 Efesto (Separate compilation phase from runtime phase inside drools)
  3. DROOLS-7130

Fix unresolved type exception inside kogito-apps/org.kie.kogito:jitexecutor-runner

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Done
    • Icon: Blocker Blocker
    • None
    • None
    • None
    • None
    • 2022 Week 17-19 (from Apr 25), 2022 Week 20-22 (from May 16), 2022 Week 23-25 (from Jun 6), 2022 Week 26-28 (from Jun 27), MGDOBR - Sprint 220, 2022 Week 29-31 (from Jul 18), 2022 Week 32-34 (from Aug 8), 2022 Week 35-37 (from Aug 29)
    • Low
    • NEW
    • NEW
    • ---
    • ---

      kogito-apps/org.kie.kogito:jitexecutor-runner fails to build due to:
      Caused by: org.graalvm.compiler.java.BytecodeParser$BytecodeParserError: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: org.kie.pmml.evaluator.core.model.EfestoInputPMML. This error is reported at image build time because class org.kie.dmn.core.pmml.DMNKiePMMLTrustyInvocationEvaluator is registered for linking at image build time by command line

      EfestoInputPMML (and other model-specific efesto dto) are not registered for reflection:
      Write "reflective-config.json" for each plugin to manage those customizewd classes

      TODO steps:

      inside "drools" repo

      current "efesto" modules are

      1. kie-pmml-trusty
      2. kie-drl

      Inside kie-pmml-trusty the "compilation" module is kie-pmml-compiler and the "runtime" module is "kie-pmml-evaluator
      Inside kie-drl the "compilation" module is "kie-drl-compilation-common", and inside "kie-drl-implementations" there are different "runtime" modules
      inside each of them, looks for classes that extends/implements:

      • EfestoCompilationOutput
      • EfestoResource
      • EfestoInput
      • EfestoOutput
        (EfestoCompilationOutput and EfestoResource should be looked for in "Compilation" modules; EfestoInput and EfestoOutput should be looked for in "runtime" modules)

      Inside each module write a "reflective-config.json" with the classes found in that specific module (see here for format) - possibly inside `src/main/resources`

      Inside "kogito-runtimes" repo

      Modify `org.kie.efesto.quarkus.deployment.EfestoProcessor`: add a method to look for created "reflective-config.json" (again, see that here for details).
      This should not be needed; from documentation: "In the previous snippet we were able to simply use reflection-config.json instead of specifying the entire path of the file simply because it was added to src/main/resources".
      Anyway, please keep in mind that the solution should not require command-line parameters nor specific pom configuration.

      Inside "kogito-apps" repo

      • install graalvm (tested version is 21.3.0)
      • cd `jitexecutor/jitexecutor-runner` module
      • issue `mvn clean package -Pnative (it should start the native image build; on first execution it may ask to download/install additional image)
      • if everything is correct, NativeImage should be built succesfully
      • if the fix is uncomplete, there should be an exception with `Discovered unresolved type during parsing: org.kie.pmml.evaluator.core.model.EfestoInputPMML.` message (or similar)

              gcardosi Gabriele Cardosi (Inactive)
              gcardosi Gabriele Cardosi (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: