apache / incubator-kie-kogito-runtimes

Kogito Runtimes - Kogito is a cloud-native business automation technology for building cloud-ready business applications.
http://kogito.kie.org
Apache License 2.0
491 stars 192 forks source link

Bad response from example deployed using native image #3546

Closed domhanak closed 3 weeks ago

domhanak commented 3 weeks ago

Describe the bug

Executing the IT tests for serverless-workflow-callback-quarkus in native mode results in test failures and there are significant number of WARNINGS in logs.

Disclaimer: this also affect other examples, I had time to only provide info on one

Example of the warnings: ( only fraction of it - to save space )

10:04:52  [INFO] Warning: Could not resolve org.kogito.workitem.rest.bodybuilders.ParamsRestWorkItemHandlerBodyBuilder for reflection configuration. Reason: java.lang.ClassNotFoundException: org.kogito.workitem.rest.bodybuilders.ParamsRestWorkItemHandlerBodyBuilder.
10:04:52  [INFO] Warning: Could not resolve org.kie.kogito.jobs.api.Job for reflection configuration. Reason: java.lang.ClassNotFoundException: org.kie.kogito.jobs.api.Job.
10:04:52  [INFO] Warning: Could not resolve org.kie.kogito.services.event.ProcessDataEvent for reflection configuration. Reason: java.lang.ClassNotFoundException: org.kie.kogito.services.event.ProcessDataEvent.

Issue: After the image is running, the response is unexpected and you can see following logs:

2024-05-29 04:04:25,459 INFO  [io.quarkus] (main) Profile native activated. 
2024-05-29 04:04:25,459 INFO  [io.quarkus] (main) Installed features: [agroal, cache, cdi, flyway, jackson-jq, jdbc-postgresql, kafka-client, kie-addon-events-process-extension, kie-addon-messaging-extension, kie-addon-persistence-jdbc-extension, kie-addon-process-management-extension, kogito-serverless-workflow, narayana-jta, qute, reactive-routes, resteasy, resteasy-client, resteasy-client-jackson, resteasy-jackson, smallrye-context-propagation, smallrye-openapi, smallrye-reactive-messaging, smallrye-reactive-messaging-http, smallrye-reactive-messaging-kafka, vertx]
Request method: POST
Request URI:    http://localhost:8081/callback
Proxy:          <none>
Request params: <none>
Query params:   <none>
Form params:    <none>
Path params:    <none>
Headers:        Accept=application/json, application/javascript, text/javascript, text/json
                Content-Type=application/json
Cookies:        <none>
Multiparts:     <none>
Body:           <none>

HTTP/1.1 400 Bad Request
Content-Type: application/json
content-length: 76

{
    "message": "Illegal node type: class org.jbpm.workflow.core.node.StartNode"
}

Expected behavior

  1. Build serverless-workflow-callback-quarkus example in native and run IT tests
  2. The request in tests should be handled properly and no error in logs.

Actual behavior

  1. Build serverless-workflow-callback-quarkus example in native and run IT tests
  2. The request in tests is not handled properly and there is error in logs.
  3. The request is not handled properly and there is
    "message": "Illegal node type: class org.jbpm.workflow.core.node.StartNode"
    }

    in logs

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Kogito version or git rev (or at least Quarkus version if you are using Kogito via Quarkus platform BOM)

No response

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

No response

Additional information

No response

fjtirado commented 3 weeks ago

This was caused by https://github.com/apache/incubator-kie-kogito-runtimes/pull/3482