Uploaded image for project: 'OptaPlanner'
  1. OptaPlanner
  2. PLANNER-2572

IllegalStateException in Quarkus with kogito (for scoreDrl?)

XMLWordPrintable

      "Guillaume Smet: @Geoffrey De Smet hey, are you aware of the OptaPlanner CI failure:

      [ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:build (default) on project optaplanner-quarkus-drl-integration-test: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
      [ERROR] [error]: Build step org.kie.kogito.quarkus.common.deployment.KogitoAssetsProcessor#generateModel threw an exception: java.lang.IllegalStateException: src/main/java/org/kie/kogito/app/GlobalObjectMapper.java (24:914) : Only a type can be imported. io.quarkus.jackson.ObjectMapperCustomizer resolves to a package
      [ERROR] src/main/java/org/kie/kogito/app/GlobalObjectMapper.java (27:1012) : ObjectMapperCustomizer cannot be resolved to a type
      [ERROR] src/main/java/org/kie/kogito/app/GlobalObjectMapper.java (24:914) : Only a type can be imported. io.quarkus.jackson.ObjectMapperCustomizer resolves to a packagesrc/main/java/org/kie/kogito/app/GlobalObjectMapper.java (27:1012) : ObjectMapperCustomizer cannot be resolved to a type
      [ERROR] at org.kie.kogito.quarkus.common.deployment.InMemoryCompiler.compile(InMemoryCompiler.java:104)
      [ERROR] at org.kie.kogito.quarkus.common.deployment.KogitoQuarkusResourceUtils.compileGeneratedSources(KogitoQuarkusResourceUtils.java:168)
      [ERROR] at org.kie.kogito.quarkus.common.deployment.KogitoAssetsProcessor.compileAndIndexJavaSources(KogitoAssetsProcessor.java:130)
      [ERROR] at org.kie.kogito.quarkus.common.deployment.KogitoAssetsProcessor.generateModel(KogitoAssetsProcessor.java:100)
      [ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      [ERROR] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      [ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      [ERROR] at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:887)
      [ERROR] at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
      [ERROR] at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
      [ERROR] at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
      [ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
      [ERROR] at java.base/java.lang.Thread.run(Thread.java:829)
      [ERROR] at org.jboss.threads.JBossThread.run(JBossThread.java:501)

      Guillaume Smet: AFAICS, Kogito is generating something requiring quarkus-jackson but the dependency is not around

      Guillaume Smet: I can easily fix it in the IT itself but I'm pretty sure it should be added to the Kogito extension instead

      Guillaume Smet: the generated class is in ./optaplanner-quarkus-integration/optaplanner-quarkus/drl-integration-test/target/generated-sources/kogito/org/kie/kogito/app/GlobalObjectMapper.java

      Guillaume Smet: this is with main"

              rsynek@redhat.com Radovan Synek (Inactive)
              gdesmet@redhat.com Geoffrey De Smet (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: