apache / apache/incubator-kie-examples
Kogito Bug when using Declared Types and/or Traits
- Dominant language
- Java
- Stars
- 300
- Forks
- 448
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 5
Description
I've been trying to use Kogito and Quarkus but I ended up not being able to use all the features that Drools gives. I'm not sure where to raise this bug so I'll start reporting it here:
- If I declare a type inside a .drl file the I have an exception: /classes/META-INF/native-image/org/acme/kogito/reflect-config/json.java (11:1) : class, interface, or enum expected.
To reproduce the error you only need to add a declared type inside a .drl file like this example: https://github.com/carlosthe19916/quarkus-quickstarts/blob/patch-1/kogito-quickstart/src/main/resources/org/acme/kogito/person-rules.drl#L6
- If I use Traits I also have this exception message:
`cannot find symbol [ERROR] : method don(....)`
Is this a problem that can be solved by adding some configuration or is it a bug? Is it possible to add an example using those features?
Note: I also reported this problem in https://github.com/quarkusio/quarkus-quickstarts/issues/488
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the declared-type case from person-rules.drl in the linked kogito-quickstart example, then check the generated native-image reflect-config.json error. Reproduce the Traits case separately and inspect the don(...) compilation failure. Done means determining whether configuration resolves either failure or documenting the unsupported behavior and adding an example if the features can work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100