Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quarkus-mongodb-panache crash kogito bpmn (cannot find class info in jandex index) #29691

Open
kstan79 opened this issue Dec 5, 2022 · 6 comments
Labels
area/kogito area/mongodb area/panache kind/bug-thirdparty Bugs that are caused by third-party components and not causing a major dysfunction of core Quarkus.

Comments

@kstan79
Copy link

kstan79 commented Dec 5, 2022

Screenshot 2022-12-06 at 1 37 24 AM

### Describe the bug

Im trying kogito using quarkus, so far so good, however after install quarkus-mongodb-panache cannot execute quarkus anymore.
i install this library using quarkus extension add quarkus-mongodb-panache, then follow guide stated https://quarkus.pro/guides/mongodb-panache.html. after extend class PanacheMongoEntity it give lot of error msg.

2022-12-06 01:34:55,972 ERROR [io.qua.dep.dev.IsolatedDevModeMain] (vert.x-worker-thread-0) Failed to start quarkus [Error Occurred After Shutdown]: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
        [error]: Build step org.kie.kogito.quarkus.processes.deployment.ProcessesAssetsProcessor#postGenerationProcessing threw an exception: java.lang.RuntimeException: Error while generating proto for model class com.simitgroup.signup.Order Cannot find class info in jandex index for short
        at org.kie.kogito.codegen.process.persistence.proto.AbstractProtoGenerator.generate(AbstractProtoGenerator.java:157)
        at org.kie.kogito.codegen.process.persistence.proto.AbstractProtoGenerator.protoOfDataClasses(AbstractProtoGenerator.java:52)
        at org.kie.kogito.codegen.process.persistence.PersistenceGenerator.generateProtoMarshaller(PersistenceGenerator.java:147)
        at org.kie.kogito.codegen.process.persistence.PersistenceGenerator.internalGenerate(PersistenceGenerator.java:125)
        at org.kie.kogito.codegen.core.AbstractGenerator.generate(AbstractGenerator.java:69)
        at org.kie.kogito.quarkus.processes.deployment.ProcessesAssetsProcessor.getGeneratedPersistenceFiles(ProcessesAssetsProcessor.java:293)
        at org.kie.kogito.quarkus.processes.deployment.ProcessesAssetsProcessor.generatePersistenceInfo(ProcessesAssetsProcessor.java:269)
        at org.kie.kogito.quarkus.processes.deployment.ProcessesAssetsProcessor.postGenerationProcessing(ProcessesAssetsProcessor.java:241)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
        at java.base/java.lang.reflect.Method.invoke(Method.java:578)
        at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:909)
        at io.quarkus.builder.BuildContext.run(BuildContext.java:281)
        at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
        at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
        at java.base/java.lang.Thread.run(Thread.java:1589)
        at org.jboss.threads.JBossThread.run(JBossThread.java:501)
Caused by: java.lang.IllegalStateException: Cannot find class info in jandex index for short
        at org.kie.kogito.quarkus.processes.deployment.JandexProtoGenerator.messageFromClass(JandexProtoGenerator.java:145)
        at org.kie.kogito.quarkus.processes.deployment.JandexProtoGenerator.messageFromClass(JandexProtoGenerator.java:53)
        at org.kie.kogito.codegen.process.persistence.proto.AbstractProtoGenerator.internalGenerate(AbstractProtoGenerator.java:183)
        at org.kie.kogito.quarkus.processes.deployment.JandexProtoGenerator.messageFromClass(JandexProtoGenerator.java:149)
        at org.kie.kogito.quarkus.processes.deployment.JandexProtoGenerator.messageFromClass(JandexProtoGenerator.java:53)
        at org.kie.kogito.codegen.process.persistence.proto.AbstractProtoGenerator.internalGenerate(AbstractProtoGenerator.java:183)
        at org.kie.kogito.codegen.process.persistence.proto.AbstractProtoGenerator.generate(AbstractProtoGenerator.java:150)
        ... 16 more

        at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:335)
        at io.quarkus.runner.bootstrap.AugmentActionImpl.reloadExistingApplication(AugmentActionImpl.java:265)
        at io.quarkus.runner.bootstrap.AugmentActionImpl.reloadExistingApplication(AugmentActionImpl.java:60)
        at io.quarkus.deployment.dev.IsolatedDevModeMain.restartApp(IsolatedDevModeMain.java:220)
        at io.quarkus.deployment.dev.IsolatedDevModeMain.restartCallback(IsolatedDevModeMain.java:203)
        at io.quarkus.deployment.dev.RuntimeUpdatesProcessor.doScan(RuntimeUpdatesProcessor.java:537)
        at io.quarkus.deployment.dev.RuntimeUpdatesProcessor.doScan(RuntimeUpdatesProcessor.java:437)
        at io.quarkus.vertx.http.runtime.devmode.VertxHttpHotReplacementSetup$4.handle(VertxHttpHotReplacementSetup.java:152)
        at io.quarkus.vertx.http.runtime.devmode.VertxHttpHotReplacementSetup$4.handle(VertxHttpHotReplacementSetup.java:139)
        at io.vertx.core.impl.ContextBase.lambda$null$0(ContextBase.java:137)
        at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:264)
        at io.vertx.core.impl.ContextBase.lambda$executeBlocking$1(ContextBase.java:135)
        at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
        at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
        at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
        at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Thread.java:1589)
Caused by: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
        [error]: Build step org.kie.kogito.quarkus.processes.deployment.ProcessesAssetsProcessor#postGenerationProcessing threw an exception: java.lang.RuntimeException: Error while generating proto for model class com.simitgroup.signup.Order Cannot find class info in jandex index for short
        at org.kie.kogito.codegen.process.persistence.proto.AbstractProtoGenerator.generate(AbstractProtoGenerator.java:157)
        at org.kie.kogito.codegen.process.persistence.proto.AbstractProtoGenerator.protoOfDataClasses(AbstractProtoGenerator.java:52)
        at org.kie.kogito.codegen.process.persistence.PersistenceGenerator.generateProtoMarshaller(PersistenceGenerator.java:147)
        at org.kie.kogito.codegen.process.persistence.PersistenceGenerator.internalGenerate(PersistenceGenerator.java:125)
        at org.kie.kogito.codegen.core.AbstractGenerator.generate(AbstractGenerator.java:69)
        at org.kie.kogito.quarkus.processes.deployment.ProcessesAssetsProcessor.getGeneratedPersistenceFiles(ProcessesAssetsProcessor.java:293)
        at org.kie.kogito.quarkus.processes.deployment.ProcessesAssetsProcessor.generatePersistenceInfo(ProcessesAssetsProcessor.java:269)
        at org.kie.kogito.quarkus.processes.deployment.ProcessesAssetsProcessor.postGenerationProcessing(ProcessesAssetsProcessor.java:241)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
        at java.base/java.lang.reflect.Method.invoke(Method.java:578)
        at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:909)
        at io.quarkus.builder.BuildContext.run(BuildContext.java:281)
        at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
        at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
        at java.base/java.lang.Thread.run(Thread.java:1589)
        at org.jboss.threads.JBossThread.run(JBossThread.java:501)
Caused by: java.lang.IllegalStateException: Cannot find class info in jandex index for short
        at org.kie.kogito.quarkus.processes.deployment.JandexProtoGenerator.messageFromClass(JandexProtoGenerator.java:145)
        at org.kie.kogito.quarkus.processes.deployment.JandexProtoGenerator.messageFromClass(JandexProtoGenerator.java:53)
        at org.kie.kogito.codegen.process.persistence.proto.AbstractProtoGenerator.internalGenerate(AbstractProtoGenerator.java:183)
        at org.kie.kogito.quarkus.processes.deployment.JandexProtoGenerator.messageFromClass(JandexProtoGenerator.java:149)
        at org.kie.kogito.quarkus.processes.deployment.JandexProtoGenerator.messageFromClass(JandexProtoGenerator.java:53)
        at org.kie.kogito.codegen.process.persistence.proto.AbstractProtoGenerator.internalGenerate(AbstractProtoGenerator.java:183)
        at org.kie.kogito.codegen.process.persistence.proto.AbstractProtoGenerator.generate(AbstractProtoGenerator.java:150)
        ... 16 more

        at io.quarkus.builder.Execution.run(Execution.java:123)
        at io.quarkus.builder.BuildExecutionBuilder.execute(BuildExecutionBuilder.java:79)
        at io.quarkus.deployment.QuarkusAr.run(QuarkusAugmentor.java:160)
        at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:331)
        ... 18 more
Caused by: java.lang.RuntimeException: Error while generating proto for model class com.simitgroup.signup.Order Cannot find class info in jandex index for short
        at org.kie.kogito.codegen.process.persistence.proto.AbstractProtoGenerator.generate(AbstractProtoGenerator.java:157)
        at org.kie.kogito.codegen.process.persistence.proto.AbstractProtoGenerator.protoOfDataClasses(AbstractProtoGenerator.java:52)
        at org.kie.kogito.codegen.process.persistence.PersistenceGenerator.generateProtoMarshaller(PersistenceGenerator.java:147)
        at org.kie.kogito.codegen.process.persistence.PersistenceGenerator.internalGenerate(PersistenceGenerator.java:125)
        at org.kie.kogito.codegen.core.AbstractGenerator.generate(AbstractGenerator.java:69)
        at org.kie.kogito.quarkus.processes.deployment.ProcessesAssetsProcessor.getGeneratedPersistenceFiles(ProcessesAssetsProcessor.java:293)
        at org.kie.kogito.quarkus.processes.deployment.ProcessesAssetsProcessor.generatePersistenceInfo(ProcessesAssetsProcessor.java:269)
        at org.kie.kogito.quarkus.processes.deployment.ProcessesAssetsProcessor.postGenerationProcessing(ProcessesAssetsProcessor.java:241)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
        at java.base/java.lang.reflect.Method.invoke(Method.java:578)
        at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:909)
        at io.quarkus.builder.BuildContext.run(BuildContext.java:281)
        at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
        at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
        at java.base/java.lang.Thread.run(Thread.java:1589)
        at org.jboss.threads.JBossThread.run(JBossThread.java:501)
Caused by: java.lang.IllegalStateException: Cannot find class info in jandex index for short
        at org.kie.kogito.quarkus.processes.deployment.JandexProtoGenerator.messageFromClass(JandexProtoGenerator.java:145)
        at org.kie.kogito.quarkus.processes.deployment.JandexProtoGenerator.messageFromClass(JandexProtoGenerator.java:53)
        at org.kie.kogito.codegen.process.persistence.proto.AbstractProtoGenerator.internalGenerate(AbstractProtoGenerator.java:183)
        at org.kie.kogito.quarkus.processes.deployment.JandexProtoGenerator.messageFromClass(JandexProtoGenerator.java:149)
        at org.kie.kogito.quarkus.processes.deployment.JandexProtoGenerator.messageFromClass(JandexProtoGenerator.java:53)
        at org.kie.kogito.codegen.process.persistence.proto.AbstractProtoGenerator.internalGenerate(AbstractProtoGenerator.java:183)
        at org.kie.kogito.codegen.process.persistence.proto.AbstractProtoGenerator.generate(AbstractProtoGenerator.java:150)
        ... 16 more

Expected behavior

it should compile well

Actual behavior

error compile: cannot find class info in jandex index for short

How to Reproduce?

  1. create quarkus project
  2. install extensions below (add this point still working)
    ✬ ArtifactId Extension Name
    ✬ kogito-addons-quarkus-persistence-mongodb Kogito Add-On Persistence MongoDB
    ✬ kogito-quarkus Kogito
    ✬ quarkus-hibernate-validator Hibernate Validator
    ✬ quarkus-mongodb-panache MongoDB with Panache
    ✬ quarkus-resteasy-reactive RESTEasy Reactive
    ✬ quarkus-resteasy-reactive-jackson RESTEasy Reactive Jackson
    ✬ quarkus-smallrye-openapi SmallRye OpenAPI
    ✬ quarkus-smallrye-reactive-messaging-kafka SmallRye Reactive Messaging - Kafka Connector
  3. create 1 entity file com.domain.Order.java which is entity using mongodb-panache
  4. create 1 bpmn file into main/resources/signups.bpmn, define process variable type com.domain.Order (once bpmn diagram connect with Order), then it failed to build

Output of uname -a or ver

Darwin kstans-MacBook-Pro.local 21.6.0 Darwin Kernel Version 21.6.0: Wed Aug 10 14:25:27 PDT 2022; root:xnu-8020.141.5~2/RELEASE_X86_64 x86_64

Output of java -version

openjdk version "19.0.1" 2022-10-18 OpenJDK Runtime Environment GraalVM CE 22.3.0 (build 19.0.1+10-jvmci-22.3-b08) OpenJDK 64-Bit Server VM GraalVM CE 22.3.0 (build 19.0.1+10-jvmci-22.3-b08, mixed mode, sharing)

GraalVM version (if different from Java)

openjdk version "19.0.1" 2022-10-18 OpenJDK Runtime Environment GraalVM CE 22.3.0 (build 19.0.1+10-jvmci-22.3-b08) OpenJDK 64-Bit Server VM GraalVM CE 22.3.0 (build 19.0.1+10-jvmci-22.3-b08, mixed mode, sharing)

Quarkus version or git rev

2.14.2.Final

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.8.6

Additional information

No response

@quarkus-bot
Copy link

quarkus-bot bot commented Dec 5, 2022

@geoand
Copy link
Contributor

geoand commented Dec 6, 2022

Can you please attach a sample project that exhibits this behavior?

@geoand geoand added the triage/needs-reproducer We are waiting for a reproducer. label Dec 6, 2022
@kstan79
Copy link
Author

kstan79 commented Dec 6, 2022

Uploaded. just run quarkus dev

** you may notice when the java entity class not use in bpmn, then it will compile as expected. you may try add / remove the variable in bpmn file
sample.zip

@geoand geoand removed the triage/needs-reproducer We are waiting for a reproducer. label Dec 6, 2022
@geoand
Copy link
Contributor

geoand commented Dec 6, 2022

Thanks. This does not look like a Quarkus issue, but a Kogito issue.

@adailsonm
Copy link

trying the same problems, any news on this?

@kstan79
Copy link
Author

kstan79 commented Jan 21, 2023

no, i think the only solution is create another class for mongodb-panache, which is separated from kogito object

@gsmet gsmet added kind/bug-thirdparty Bugs that are caused by third-party components and not causing a major dysfunction of core Quarkus. and removed triage/upstream kind/bug Something isn't working labels Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kogito area/mongodb area/panache kind/bug-thirdparty Bugs that are caused by third-party components and not causing a major dysfunction of core Quarkus.
Projects
None yet
Development

No branches or pull requests

4 participants