Can you provide us the compilation error reported (gist link) and a test case to allow us to reproduce your issue ?


On Mon, May 19, 2014 at 4:00 PM, Ephemeris Lappis <ephemeris.lappis@gmail.com> wrote:
Hello.

We have a very simple rules file that works as expected when running as a
JUnit test in Eclipse with Maven dependencies, but fails when it is
executing in ServiceMix with OSGi integration.

The code is just like :

raw>
Map<String, Object> dialog = new LinkedHashMap<>();
KieSession kieSession = kieContainer.newKieSession("MyKSession");
kieSession.setGlobal("dialog", dialog);
kieSession.insert(problem);
kieSession.fireAllRules();
kieSession.dispose();


The rules file :



And the kmodule.xml :



The compilation error is about Java 7 syntax elements (as generics or
thousand separators in number literals for example), and seems to indicate
that in this case the compiler is not the same, and it expects another Java
syntax. No error is reported when the KieContainer is created from the
KModule.xml, but the following error occurs when using it for KSession
creation.



This occurs both with the prepackaged feature
(http://repo1.maven.org/maven2/org/drools/drools-karaf-features/6.1.0.Beta3/drools-karaf-features-6.1.0.Beta3-features.xml),
or with an adapted one. For example, the Maven dependancies classpath in
eclipse mentions newer versions of the Eclipse's ECJ. But changing the
version of bundles has no effect...

What is missing in the feature to activate the correct rules compiler ?

Thanks for your help ?

Regards.




--
View this message in context: http://drools.46999.n3.nabble.com/Rules-compilation-error-with-OSGi-integration-6-1-0-Beta3-tp4029601.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users



--
Charles Moulliard
Apache Committer / Architect @RedHat
Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io