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
541 stars 209 forks source link

Works in quarkus:dev but could not find data type com.fasterxml.jackson.databind.JsonNode when using native #1918

Closed crionuke closed 2 years ago

crionuke commented 2 years ago

Describe the bug

Hi, again! Try using latest release of kogito with quarkus native mode. Made simple project with this SW - https://github.com/kiegroup/kogito-examples/blob/a8e312fe083c1ff48513f4e37d853d2975251b68/serverless-workflow-greeting-quarkus/src/main/resources/yamlgreet.sw.yml. And its works perfect via quarkus:dev, but after native compilation i got next error

2022-01-21 06:51:31,829 ERROR [io.qua.run.Application] (main) Failed to start application (with profile prod): java.lang.IllegalArgumentException: **Could not find data type com.fasterxml.jackson.databind.JsonNode**
    at org.jbpm.process.core.datatype.impl.type.ObjectDataType.verifyDataType(ObjectDataType.java:94)
    at org.jbpm.ruleflow.core.RuleFlowProcessFactory.variable(RuleFlowProcessFactory.java:188)
    at org.kie.kogito.serverless.YamlgreetProcess.process(YamlgreetProcess.java:54)

So, I have two question 1 Do you have some idea how to fix it? 2 Does Kogito have LTS version tested and production ready?

PS Profiles events and persistence from my pom.xml was enabled during build.

Expected behavior

No response

Actual behavior

No response

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

<?xml version="1.0"?> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

4.0.0
<groupId>ru.company.kogito</groupId>
<artifactId>kogito-demo-project</artifactId>
<version>1.0.0-SNAPSHOT</version>

<properties>
    <compiler-plugin.version>3.8.1</compiler-plugin.version>
    <surefire-plugin.version>3.0.0-M5</surefire-plugin.version>
    <maven.compiler.target>11</maven.compiler.target>
    <maven.compiler.source>11</maven.compiler.source>
    <quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
    <quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
    <quarkus.platform.version>2.6.2.Final</quarkus.platform.version>
    <kogito-quarkus.version>1.16.0.Final</kogito-quarkus.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>${quarkus.platform.group-id}</groupId>
            <artifactId>${quarkus.platform.artifact-id}</artifactId>
            <version>${quarkus.platform.version}</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
        <dependency>
            <groupId>org.kie.kogito</groupId>
            <artifactId>kogito-quarkus-bom</artifactId>
            <version>${kogito-quarkus.version}</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

<dependencies>
    <dependency>
        <groupId>io.quarkus</groupId>
        <artifactId>quarkus-arc</artifactId>
    </dependency>
    <dependency>
        <groupId>io.quarkus</groupId>
        <artifactId>quarkus-resteasy</artifactId>
    </dependency>
    <dependency>
        <groupId>io.quarkus</groupId>
        <artifactId>quarkus-resteasy-jackson</artifactId>
    </dependency>
    <dependency>
        <groupId>io.quarkus</groupId>
        <artifactId>quarkus-smallrye-openapi</artifactId>
    </dependency>
    <dependency>
        <groupId>io.quarkus</groupId>
        <artifactId>quarkus-smallrye-health</artifactId>
    </dependency>

    <dependency>
        <groupId>org.kie.kogito</groupId>
        <artifactId>kogito-quarkus</artifactId>
    </dependency>
    <dependency>
        <groupId>org.kie.kogito</groupId>
        <artifactId>kogito-quarkus-decisions</artifactId>
    </dependency>
    <dependency>
        <groupId>org.kie.kogito</groupId>
        <artifactId>kogito-quarkus-serverless-workflow</artifactId>
    </dependency>

    <dependency>
        <groupId>io.quarkus</groupId>
        <artifactId>quarkus-junit5</artifactId>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>io.rest-assured</groupId>
        <artifactId>rest-assured</artifactId>
        <scope>test</scope>
    </dependency>
</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>${quarkus.platform.group-id}</groupId>
            <artifactId>quarkus-maven-plugin</artifactId>
            <version>${quarkus.platform.version}</version>
            <extensions>true</extensions>
            <executions>
                <execution>
                    <goals>
                        <goal>build</goal>
                        <goal>generate-code</goal>
                        <goal>generate-code-tests</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>${compiler-plugin.version}</version>
            <configuration>
                <compilerArgs>
                    <arg>-parameters</arg>
                </compilerArgs>
            </configuration>
        </plugin>
        <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>${surefire-plugin.version}</version>
            <configuration>
                <systemPropertyVariables>
                    <java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
                    <maven.home>${maven.home}</maven.home>
                </systemPropertyVariables>
            </configuration>
        </plugin>
    </plugins>
</build>

<profiles>
    <profile>
        <id>native</id>
        <activation>
            <property>
                <name>native</name>
            </property>
        </activation>
        <build>
            <plugins>
                <plugin>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>${surefire-plugin.version}</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>integration-test</goal>
                                <goal>verify</goal>
                            </goals>
                            <configuration>
                                <systemPropertyVariables>
                                    <native.image.path>
                                        ${project.build.directory}/${project.build.finalName}-runner
                                    </native.image.path>
                                    <java.util.logging.manager>org.jboss.logmanager.LogManager
                                    </java.util.logging.manager>
                                    <maven.home>${maven.home}</maven.home>
                                </systemPropertyVariables>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </build>
        <properties>
            <quarkus.package.type>native</quarkus.package.type>
        </properties>
    </profile>
    <profile>
        <id>persistence</id>
        <activation>
            <property>
                <name>persistence</name>
            </property>
        </activation>
        <dependencies>
            <dependency>
                <groupId>org.kie.kogito</groupId>
                <artifactId>kogito-addons-quarkus-persistence-mongodb</artifactId>
            </dependency>
        </dependencies>
    </profile>
    <profile>
        <id>events</id>
        <activation>
            <property>
                <name>events</name>
            </property>
        </activation>
        <build>
            <plugins>
                <plugin>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <configuration>
                        <systemPropertyVariables>
                            <enable.resource.kafka>true</enable.resource.kafka>
                        </systemPropertyVariables>
                    </configuration>
                </plugin>
            </plugins>
        </build>
        <properties>
            <enable.resource.kafka>true</enable.resource.kafka>
        </properties>
        <dependencies>
            <dependency>
                <groupId>org.kie.kogito</groupId>
                <artifactId>kogito-addons-quarkus-events-process</artifactId>
            </dependency>
            <dependency>
                <groupId>io.quarkus</groupId>
                <artifactId>quarkus-smallrye-reactive-messaging-kafka</artifactId>
            </dependency>
        </dependencies>
    </profile>
</profiles>

sutaakar commented 2 years ago

@crionuke It is a known issue, reported as KOGITO-6561 Right now it is fixed on main branch and should be backported to the next Kogito release (1.16) - https://github.com/kiegroup/kogito-runtimes/pull/1913

crionuke commented 2 years ago

@sutaakar thank a lot for information, but you mean 1.17 as 1.16 already released?

sutaakar commented 2 years ago

It depends if there will be a patch released for 1.16, otherwise it will be fixed in 1.17.