incubator-kie-kogito-runtimes
incubator-kie-kogito-runtimes copied to clipboard
KnowledgeBuilderConfigurationImpl cannot be cast to SemanticKnowledgeBuilderConfigurationImpl
Describe the bug
I plan to upgrade drools8, I have a ruleflow in my project, so I tried to introduce jbpm-flow-builder, jbpm-flow and other components, but found that jbpm-flow-builder does not have a corresponding drools8 version, so I tried to use org.kie.kogito jbpm-flow-builder 1.34.0.Final, but found that if the error is reported, how to solve it.
java.lang.ClassCastException: class org.drools.compiler.builder.impl.KnowledgeBuilderConfigurationImpl cannot be cast to class org.jbpm.compiler.xml.compiler.SemanticKnowledgeBuilderConfigurationImpl (org.drools.compiler.builder.impl.KnowledgeBuilderConfigurationImpl and org.jbpm.compiler.xml.compiler.SemanticKnowledgeBuilderConfigurationImpl are in unnamed module of loader 'app')
at org.jbpm.compiler.ProcessBuilderImpl.configurePackageBuilder(ProcessBuilderImpl.java:101)
at org.jbpm.compiler.ProcessBuilderImpl.
My code is below: ..... KnowledgeBuilder kbuilder = null; InternalKnowledgeBase kbase = null; kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); .....
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
11
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)
<groupId>org.kie.kogito</groupId>
<artifactId>jbpm-flow-builder</artifactId>
Build tool (ie. output of mvnw --version
or gradlew --version
)
No response
Additional information
No response
@mariofusco @gitgabrio can you have a look to this one ?
Hi @DawnandGloaming I'm not expert Process, but IMO you are mixing two different "kind of" jars/inheritance tree. @mariofusco ?
Hi @DawnandGloaming I'm not expert Process, but IMO you are mixing two different "kind of" jars/inheritance tree. @mariofusco ?