Open chiippy opened 9 years ago
The features definition for kie-camel in 6.2.0Final are using older version of camel-cxf (2.14.0) and camel-core :
<feature name="kie-camel" version="6.2.0.Final">
<feature version="6.2.0.Final">kie-spring</feature>
<feature version="6.2.0.Final">jbpm</feature>
<feature version="2.14.0">camel-core</feature>
<feature version="2.14.0">camel-spring</feature>
<feature version="2.14.0">camel-cxf</feature>
<feature version="[2.6,3.0)">cxf-specs</feature>
<feature version="[2.6,3.0)">cxf-core</feature>
<feature version="[2.6,3.0)">cxf-jaxrs</feature>
<bundle>mvn:org.kie/kie-camel/6.2.0.Final</bundle>
</feature>
changed it to use the one in Fuse : 2.15.1.redhat-620133 and I managed to deploy the sample and it works !
Eric, can you open a ticket on BPM Suite side, when you are back? This is a product problem.
Thanks WeiMei.
Now that I have got both of the samples deployed and working nicely in Fuse, however, I don't believe they work as the demo intended ?
The log did print something as Chilton | 198 - org.apache.camel.camel-core - 2.15.1.redhat-620133 | Cheese Cheddar costs 50 EUR. Chilton | 198 - org.apache.camel.camel-core - 2.15.1.redhat-620133 | Cheese Stilton costs 10 EUR.
However, that only prints whatever the Cheese object was created. If you look at the kie.xml, camel choice end-point and the XLS rule definition, I don't believe this work as whatever the sample would like to demo ?
1) the end point 'ChesseType' always TRUE because the Chesse object has been generated with a Type. So, the Chilton logger always uses. You will never see the 'Otherwise' part !
2) I don't see any where in the Kie.xml of loading the Rule Decision table. Even remove the XLS from the Project, makes no different as I believes Drools simply applies empty rule. So, the setup ends up like printing a 'hello world' in a VERY complicating way !
Is this really a sample of demo the camel decision table usage or just a dummy for completeness ? May be this thing has never works ? Or I totally misunderstood the purpose of these demos ?
Regards
Alex
Carry on with the demo as I really want to know if this works :
1) the decision table was picked up by default as Kie picks up anything in the "resources" by default.
2) the rule was fired but no result because rule data is case sensitive. So,
org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[Message: org.drools.core.runtime.impl.ExecutionResultImpl@7556840a] at org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1635)[org.apache.camel:camel-core:2.15.1.redhat-620133 com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.4.2] .... .... at java.util.TimerThread.run(Timer.java:505)[:1.8.0_40] Caused by: java.lang.NoClassDefFoundError: org/drools/core/runtime/impl/ExecutionResultImpl at org.drools.camel.example.DroolsCommandResultHelper.passResult(DroolsCommandResultHelper.java:21)[368:org.drools.example.spring-camel-decision-table:1.0.0.SNAPSHOT]
So, Camel do know the message in the Exchaneg object that it is a "org.drools.core.runtime.impl.ExecutionResultImpl" object as it had print out at the beginning of the exception, but my bean unable to load the same Class in the message ?? How ?
If I can't reference the ExecutionResultImpl Class in my bean, there is not way I can harvest the result of the rule execution.
I thought this was a problem with the Blueprint container, but seems like same for Spring.
Any help is appreciated.
Thanks
Alex
PS : I am not sure if this is the right place discuss about these DEMO app issues, if not, please point me to the right place. thanks.
Just had another look with this one. Problem was the kie.api.runtime package wasn't included in the bundle. Added it and resolved the problem.
However, uri : kie:ksession1?action=insertBody works in stateless ksession but no fire the rules in stateful. No error, so I have no idea why.
Just had another go with this, instead of using kie:session?action=execute, I am trying to execute the batch commands on a remote kie-server, then umarshall the result using BatchExecutionHelper, but then I am getting the error as following :
Caused by: java.lang.ClassNotFoundException: org.drools.core.runtime.help.impl.BatchExecutionHelperProviderImpl not found by org.kie.internalapi [281] at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1556) at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:77) at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1993) at java.lang.ClassLoader.loadClass(ClassLoader.java:357)[:1.8.0_40] at java.lang.Class.forName0(Native Method)[:1.8.0_40] at java.lang.Class.forName(Class.java:264)[:1.8.0_40] at org.kie.internal.runtime.helper.BatchExecutionHelper.loadProvider(BatchExecutionHelper.java:275)[org.kie:kie-internal:6.2.0.Final]
I can see the code tried to load the provider :
Class
However, this wasn't in the kie-api import list and I don't know how to change this. :(
Any suggestions ?
Thanks
Alex
chiippy,
I have the same issue when performing the following operation
features:install kie-camel
Have you found a work around?
Thanks
William
Hi William
kie-camel is an interface implementation, unfortunately, the actual implementation wasn't imported in the package. You have to use the actual implementation, i.e BatchExecutionHelperProviderImpl to harvest the result. No pretty but it works.
Alex
Maven compiles successfully. When perform the install in the fuse shell :
JBossFuse:karaf@root> features:install drools-decisiontable-kie-blueprint-camel Error executing command: Could not start bundle mvn:org.apache.camel/camel-cxf/2.14.0 in feature(s) camel-cxf-2.14.0: Us es constraint violation. Unable to resolve bundle revision org.apache.camel.camel-cxf [313.0] because it is exposed to p ackage 'org.apache.camel.converter.jaxp' from bundle revisions org.apache.camel.camel-core [311.0] and org.apache.camel. camel-core [198.0] via two dependency chains.
Chain 1: org.apache.camel.camel-cxf [313.0] import: (&(osgi.wiring.package=org.apache.camel.converter.jaxp)(version>=2.14.0)(!(version>=2.15.0))) | export: osgi.wiring.package=org.apache.camel.converter.jaxp org.apache.camel.camel-core [311.0]
org.apache.camel.camel-core [198.0] JBossFuse:karaf@root>
Seems like the examples haven't been updated to use the Fuse 6.2 library properly ?