Comments (17)
I understood than this error appears when we use java.math.BigDecimal.
@evacchi In our project we tried to use diffrent versions of quarkus, from 2.6.0 to 2.6.3.Final
<quarkus.platform.version>2.6.3.Final</quarkus.platform.version>
from incubator-kie-kogito-examples.
@evacchi Looks like short is not supported in jandex?
from incubator-kie-kogito-examples.
looks like a classloader-related issue. Which version of Quarkus? /cc @aloubyansky
from incubator-kie-kogito-examples.
@evacchi you can download this project from https://github.com/kiegroup/kogito-examples/tree/stable/kogito-quarkus-examples/process-postgresql-persistence-quarkus stable version and try to add private short number in Traveler class. Here is the pom: pom.txt
from incubator-kie-kogito-examples.
And i got the same error in our project:
2022-01-24 10:38:46,590 DEBUG [io.qua.dep.ste.CombinedIndexBuildStep] (build-4) Index: [I
2022-01-24 10:38:46,591 WARN [io.qua.dep.ste.CombinedIndexBuildStep] (build-4) Failed to index [I: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: DEV@7d9e8ef7
I can't share this business model, but it's valid model, it's used in production. So i can't understand what is "[I".
from incubator-kie-kogito-examples.
I'll look into this.
from incubator-kie-kogito-examples.
@Dantes-Damir should there be anything more than changing the Traveller class and launch dev mode? I did the following
[aloubyansky@localhost process-postgresql-persistence-quarkus]$ git diff
diff --git a/kogito-quarkus-examples/process-postgresql-persistence-quarkus/src/main/java/org/acme/deals/Traveller.java b/kogito-quarkus-examples/process-postgresql-persistence-quarkus/src/main/java/org/acme/deals/Traveller.java
index 02e90894..f980087a 100644
--- a/kogito-quarkus-examples/process-postgresql-persistence-quarkus/src/main/java/org/acme/deals/Traveller.java
+++ b/kogito-quarkus-examples/process-postgresql-persistence-quarkus/src/main/java/org/acme/deals/Traveller.java
@@ -22,6 +22,7 @@ public class Traveller {
private String email;
private String nationality;
private Address address;
+ private java.math.BigDecimal number;
public Traveller() {
@@ -75,6 +76,14 @@ public class Traveller {
this.address = address;
}
+ public java.math.BigDecimal getNumber() {
+ return number;
+ }
+
+ public void setNumber(java.math.BigDecimal number) {
+ this.number = number;
+ }
+
Also tried short
. Haven't seen any error yet. Quarkus 2.6.2.Final. Thanks.
from incubator-kie-kogito-examples.
@aloubyansky Did you start project with -Ppersistence?
from incubator-kie-kogito-examples.
No, that's what I was missing. Thanks.
from incubator-kie-kogito-examples.
Hi @aloubyansky! Is there any solution for my problem? Maybe any walkaround? Thanks.
from incubator-kie-kogito-examples.
Sorry, haven't figured it out yet.
from incubator-kie-kogito-examples.
We too get the same road block. Had zonedatetime or localdate in the process variable. Getting error for short not in jandex.
Google protobuf have timestamp and date.
Is there anything by which we can specify which datatype to convert.
Currently only String, Integer, Long, Double, Boolean, Date works. We can't add any other data type on kogito
Using 1.16.0.Final and 2.7.0.Final quarkus.
Something in kogito code gen causing the issue.
Also quarkus-kogito-bom is missing 2.7.0.Final build last bild is 2.7.0.CR1.
Please opine on the fix if we need to do any change to fix
from incubator-kie-kogito-examples.
@evacchi it doesn't look like a classloading issue to me but something that should be fixed in the proto generator, e.g.
diff --git a/quarkus/extensions/kogito-quarkus-processes-extension/kogito-quarkus-processes-deployment/src/main/java/org/kie/kogito/quarkus/processes/deployment/JandexProtoGenerator.java b/quarkus/extensions/kogito-quarkus-processes-extension/kogito-quarkus-processes-deployment/src/main/java/org/kie/kogito/quarkus/processes/deployment/JandexProtoGenerator.java
index d1d3bdd70e..65c60692a7 100644
--- a/quarkus/extensions/kogito-quarkus-processes-extension/kogito-quarkus-processes-deployment/src/main/java/org/kie/kogito/quarkus/processes/deployment/JandexProtoGenerator.java
+++ b/quarkus/extensions/kogito-quarkus-processes-extension/kogito-quarkus-processes-deployment/src/main/java/org/kie/kogito/quarkus/processes/deployment/JandexProtoGenerator.java
@@ -149,6 +149,9 @@ public class JandexProtoGenerator extends AbstractProtoGenerator<ClassInfo> {
}
fieldType = typeParameters.get(0).name();
protoType = protoType(fieldType.toString());
+ } else if(pd.type().kind() == Kind.ARRAY) {
+ fieldTypeString = "Collection";
+ protoType = protoType(pd.type().asArrayType().component().toString());
} else {
With that I get passed that error but then it fails with
2022-02-08 18:47:41,649 DEBUG [org.kie.kog.cod.cor.ApplicationGenerator] (build-39) =====
2022-02-08 18:47:42,347 ERROR [org.kie.kog.qua.com.dep.InMemoryCompiler] (build-5) src/main/java/org/kie/kogito/persistence/KogitoProcessInstancesFactoryImpl.java (11:609) : The constructor KogitoProcessInstancesFactory(DataSource, Boolean) is undefined
2022-02-08 18:47:42,347 ERROR [org.kie.kog.qua.com.dep.InMemoryCompiler] (build-5) src/main/java/org/kie/kogito/app/BigDecimalMessageMarshaller.java (32:1158) : The constructor BigDecimal() is undefined
2022-02-08 18:47:42,348 ERROR [org.kie.kog.qua.com.dep.InMemoryCompiler] (build-5) src/main/java/org/kie/kogito/app/BigDecimalMessageMarshaller.java (33:1200) : The method setIntVal(reader.readObject("intVal", java.math.BigInteger.class)) is undefined for the type BigDecimal
2022-02-08 18:47:42,348 ERROR [org.kie.kog.qua.com.dep.InMemoryCompiler] (build-5) src/main/java/org/kie/kogito/app/BigDecimalMessageMarshaller.java (39:1480) : The method getIntVal() is undefined for the type BigDecimal
2022-02-08 18:47:42,348 ERROR [org.kie.kog.qua.com.dep.InMemoryCompiler] (build-5) src/main/java/org/kie/kogito/app/BigDecimalMessageMarshaller.java (40:1557) : The method getScale() is undefined for the type BigDecimal
2022-02-08 18:47:42,349 ERROR [org.kie.kog.qua.com.dep.InMemoryCompiler] (build-5) src/main/java/org/kie/kogito/app/BigIntegerMessageMarshaller.java (32:1158) : The constructor BigInteger() is undefined
2022-02-08 18:47:42,349 ERROR [org.kie.kog.qua.com.dep.InMemoryCompiler] (build-5) src/main/java/org/kie/kogito/app/BigIntegerMessageMarshaller.java (33:1200) : The method setBitCountPlusOne(Integer) is undefined for the type BigInteger
2022-02-08 18:47:42,349 ERROR [org.kie.kog.qua.com.dep.InMemoryCompiler] (build-5) src/main/java/org/kie/kogito/app/BigIntegerMessageMarshaller.java (34:1269) : The method setBitLengthPlusOne(Integer) is undefined for the type BigInteger
2022-02-08 18:47:42,350 ERROR [org.kie.kog.qua.com.dep.InMemoryCompiler] (build-5) src/main/java/org/kie/kogito/app/BigIntegerMessageMarshaller.java (35:1340) : The method setFirstNonzeroIntNumPlusTwo(Integer) is undefined for the type BigInteger
2022-02-08 18:47:42,350 ERROR [org.kie.kog.qua.com.dep.InMemoryCompiler] (build-5) src/main/java/org/kie/kogito/app/BigIntegerMessageMarshaller.java (36:1429) : The method setLowestSetBitPlusTwo(Integer) is undefined for the type BigInteger
2022-02-08 18:47:42,351 ERROR [org.kie.kog.qua.com.dep.InMemoryCompiler] (build-5) src/main/java/org/kie/kogito/app/BigIntegerMessageMarshaller.java (37:1506) : The method setMag(reader.readCollection("mag", new java.util.ArrayList(), Integer.class)) is undefined for the type BigInteger
2022-02-08 18:47:42,351 ERROR [org.kie.kog.qua.com.dep.InMemoryCompiler] (build-5) src/main/java/org/kie/kogito/app/BigIntegerMessageMarshaller.java (38:1600) : The method setSignum(Integer) is undefined for the type BigInteger
2022-02-08 18:47:42,352 ERROR [org.kie.kog.qua.com.dep.InMemoryCompiler] (build-5) src/main/java/org/kie/kogito/app/BigIntegerMessageMarshaller.java (43:1806) : The method getBitCountPlusOne() is undefined for the type BigInteger
2022-02-08 18:47:42,352 ERROR [org.kie.kog.qua.com.dep.InMemoryCompiler] (build-5) src/main/java/org/kie/kogito/app/BigIntegerMessageMarshaller.java (44:1875) : The method getBitLengthPlusOne() is undefined for the type BigInteger
2022-02-08 18:47:42,353 ERROR [org.kie.kog.qua.com.dep.InMemoryCompiler] (build-5) src/main/java/org/kie/kogito/app/BigIntegerMessageMarshaller.java (45:1954) : The method getFirstNonzeroIntNumPlusTwo() is undefined for the type BigInteger
2022-02-08 18:47:42,353 ERROR [org.kie.kog.qua.com.dep.InMemoryCompiler] (build-5) src/main/java/org/kie/kogito/app/BigIntegerMessageMarshaller.java (46:2036) : The method getLowestSetBitPlusTwo() is undefined for the type BigInteger
2022-02-08 18:47:42,354 ERROR [org.kie.kog.qua.com.dep.InMemoryCompiler] (build-5) src/main/java/org/kie/kogito/app/BigIntegerMessageMarshaller.java (47:2103) : The method getMag() is undefined for the type BigInteger
2022-02-08 18:47:42,354 ERROR [org.kie.kog.qua.com.dep.InMemoryCompiler] (build-5) src/main/java/org/kie/kogito/app/BigIntegerMessageMarshaller.java (48:2165) : The method getSignum() is undefined for the type BigInteger
from incubator-kie-kogito-examples.
Or possibly org.kie.kogito.codegen.process.persistence.proto.ProtoGenerator.protoType(type)
should recognize BigDecimal in similar way it recognizes Date?
from incubator-kie-kogito-examples.
@debu999 fyi, 2.7.1.Final has been released today which includes Kogito.
from incubator-kie-kogito-examples.
Thanks @aloubyansky on the info. A new feature request is added to kogito for including other date formats for marshalling.
https://issues.redhat.com/browse/KOGITO-6756
Hope to use few additional data types soon. Will definitely try out kogito with quarkus inn2.7.1.Final today and share update
from incubator-kie-kogito-examples.
Fixed on Kogito 1.18, feel free to reopen if issue is not resolved completely.
from incubator-kie-kogito-examples.
Related Issues (20)
- Jobs Service Error HOT 11
- process-usertasks-quarkus-with-console bugs HOT 17
- Wrong time format in process-kafka-multi-quarkus example HOT 3
- Doesn't compile with latest mvn (3.9.0), and version listed in readme is incorrect HOT 3
- A required class was missing while executing net.revelc.code:impsort-maven-plugin:1.5.0:sort: org/codehaus/plexus/util/DirectoryScanner HOT 1
- [process-kafka-quickstart-quarkus] Error connecting to node kafka:9092 (id: 0 rack: null): java.net.UnknownHostException: 不知道这样的主机。 (kafka) HOT 5
- serverless-workflow-hello-world dev model get error HOT 1
- process-quarkus-example build failure: class not found CalculationService HOT 2
- Exploring API-Kogito Integration in kogito-examples: Any Use Cases? HOT 2
- Kogito Workflow not working with Mongo HOT 2
- Kogito Serverless Workflow does not send the Cloud Event in binary mode HOT 2
- Async API with publish and subscribe operation HOT 1
- Error in process-usertasks-timer-quarkus-with-console-runner for management/task console HOT 6
- PostgreSQL error in "process-usertasks-quarkus-with-console" example HOT 5
- Jobs service not working HTTPS HOT 1
- sorry please delete this
- Disable process-outbox-mongodb-quarkus example Integration test
- Enhance/Enable process-outbox-mongodb-quarkus example Integration test
- Re-evaluate these tests HOT 2
- kogito documentation is pointing to a branch with compilation errors HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from incubator-kie-kogito-examples.