[JBoss JIRA] (DROOLS-140) KIE module injection through CDI does not work in container
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/DROOLS-140?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration commented on DROOLS-140:
------------------------------------------------
Marek Winkler <mwinkler(a)redhat.com> made a comment on [bug 955193|https://bugzilla.redhat.com/show_bug.cgi?id=955193]
(In reply to Kanchan Desai from comment #15)
> Hi Marek,
>
> Can you please share some more info on this bug, probably the fix and the
> result.
Hi Kanchan,
in general, this issue has been caused by Drools resource loading which was not suitable for the JBoss EAP application server environment. EAP uses JBoss VFS and Drools resource loading mechanism had problems with that.
The reason was that Drools attempts to locate every KieModule on the classpath by looking for all resources called 'META-INF/kmodule.xml'. For every such resource found, it needs also to locate pom.properties (or pom.xml) file.
The problem was that path of pom.properties is not known in advance (it is located in a relative path to kmodule.xml, such as 'maven/<groupId>/<artifactId>/pom.properties'), where <groupId> and <artifactId> are directories named according to the maven artifact they are part of, therefore you cannot use standard java resource loading mechanism to locate it. Drools accessed the filesystem (either a jar, or physical filesystem) hosting the kmodule.xml resource to determine the location of pom.properties, which did not work in case of JBoss VFS.
Mario has fixed that, in case you needed more technical details about the fix, he would give you the most accurate information.
The result is working CDI injection of Drools KieBase and KieSession with EAP. The attached reproducer web app works now when deployed to EAP (it defines a CDI bean which is able to inject a KieSession defined in kmodule.xml).
> KIE module injection through CDI does not work in container
> -----------------------------------------------------------
>
> Key: DROOLS-140
> URL: https://issues.jboss.org/browse/DROOLS-140
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Reporter: Mario Fusco
> Assignee: Mario Fusco
> Fix For: 6.0.0.CR1
>
>
> Description of problem:
> Injection of KIE module through CDI fails on JBoss EAP 6.0/6.1 due to wrong processing of resource URI when loading pom.properties in ClasspathKieProject.
> Version-Release number of selected component (if applicable):
> BRMS 6.0.0.Beta1
> EAP 6.0, 6.1.ER4
> How reproducible:
> Deploy the attached reproducer WAR. Deployment fails, server.log contains the following error (see attachment for all errors in log):
> 15:40:29,923 INFO [stdout] (MSC service thread 1-2) kmodules: vfs:/content/kie-cdi-war-web-app-1.0.0-SNAPSHOT.war/WEB-INF/lib/kie-cdi-war-kie-module-1.0.0-SNAPSHOT.jar/META-INF/kmodule.xml
> 15:40:29,939 ERROR [org.drools.compiler.kie.builder.impl.ClasspathKieProject] (MSC service thread 1-2) Unable to load pom.properties from/content/kie-cdi-war-web-app-1.0.0-SNAPSHOT.war/WEB-INF/lib/kie-cdi-war-kie-module-1.0.0-SNAPSHOT.jar as jarPath cannot be found
> /content/kie-cdi-war-web-app-1.0.0-SNAPSHOT.war/WEB-INF/lib/kie-cdi-war-kie-module-1.0.0-SNAPSHOT.jar
> The first log line shows that ClasspathKieProject located kmodule.xml at URL starting with protocol 'vfs:'. Later, in method fixURLFromKProjectPath, the protocol prefix is removed, leading to URL /content/kie-cdi-war-web-app-1.0.0-SNAPSHOT.war/WEB-INF/lib/kie-cdi-war-kie-module-1.0.0-SNAPSHOT.jar which now references absolute path which is wrong.
> Steps to Reproduce:
> 1. Deploy attached reproducer WAR on EAP 6.
> 2. Watch server.log for deployment errors.
>
> Actual results:
> Deployment fails due to failed injection.
> Expected results:
> Application deploys successfully and writes INFO message into server.log.
> Additional info:
> This issue blocks further testing if KIE module injection through CDI. It also renders the CDI feature unusable in real environment (e.g. some web or EJB container with CDI).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] (DROOLS-249) Handle conflicts when using @position in declared types
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/DROOLS-249?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration commented on DROOLS-249:
------------------------------------------------
Mario Fusco <mfusco(a)redhat.com> made a comment on [bug 1021812|https://bugzilla.redhat.com/show_bug.cgi?id=1021812]
declare A
f : int @position(2)
g : int @position(1)
end
declare B extends A
h : int @position(3)
i : int @position(2)
end
The resulting field order may not be deterministic because of
the clashes (2)
the missing pos (0)
this is dangerous when used with positional constraints
B( $x, $y, $z, $w ; )
> Handle conflicts when using @position in declared types
> -------------------------------------------------------
>
> Key: DROOLS-249
> URL: https://issues.jboss.org/browse/DROOLS-249
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 5.5.0.Final, 6.0.0.CR2
> Reporter: Davide Sottara
> Assignee: Mario Fusco
> Priority: Minor
> Fix For: 5.5.1.Final, 6.0.0.Final
>
>
> declare A
> f : int @position(2)
> g : int @position(1)
> end
> declare B extends A
> h : int @position(3)
> i : int @position(2)
> end
> The resulting field order may not be deterministic because of
> - the clashes (2)
> - the missing pos (0)
> this is dangerous when used with positional constraints
> B( $x, $y, $z, $w ; )
> Marked as minor because of the obvious workaround
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] (DROOLS-178) NoSuchMethodError at runtime due to eval in query (BW chaining)
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/DROOLS-178?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration commented on DROOLS-178:
------------------------------------------------
Mario Fusco <mfusco(a)redhat.com> made a comment on [bug 1021810|https://bugzilla.redhat.com/show_bug.cgi?id=1021810]
Fixed by https://github.com/droolsjbpm/drools/commit/51b3d7794fd1f50bea2a6888db6ae...
> NoSuchMethodError at runtime due to eval in query (BW chaining)
> ---------------------------------------------------------------
>
> Key: DROOLS-178
> URL: https://issues.jboss.org/browse/DROOLS-178
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 5.5.0.Final
> Reporter: Wolfgang Laun
> Assignee: Mario Fusco
> Priority: Critical
> Fix For: 5.5.1.Final, 6.0.0.Final
>
>
> An eval CW in a query used in a BW chaining rule compiles, but causes a NoSuchMethodError when executed.
> Exception in thread "main" java.lang.NoSuchMethodError:
> pythagoras.Rule_isTriple_17ac16f7237046ee9562afce35dfe174.eval0(III)Z
> at pythagoras.Rule_isTriple_17ac16f7237046ee9562afce35dfe174Eval0InvokerGenerated.evaluate(Unknown
> Source)
> at pythagoras.Rule_isTriple_17ac16f7237046ee9562afce35dfe174Eval0Invoker.evaluate(Unknown
> Source)
> at org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:114)
> at org.drools.reteoo.EvalConditionNode.assertLeftTuple(EvalConditionNode.java:176)
> at org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:196)
> at org.drools.reteoo.SingleLeftTupleSinkAdapter.propagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:71)
> at org.drools.reteoo.JoinNode.propagateFromRight(JoinNode.java:159)
> at org.drools.reteoo.JoinNode.assertObject(JoinNode.java:148)
> at org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:497)
> at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:382)
> at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:235)
> at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:240)
> at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:350)
> at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:311)
> at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:903)
> at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:847)
> at org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:269)
> at pythagoras.Main.makeFacts(Main.java:94)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] (DROOLS-178) NoSuchMethodError at runtime due to eval in query (BW chaining)
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/DROOLS-178?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration commented on DROOLS-178:
------------------------------------------------
Mario Fusco <mfusco(a)redhat.com> changed the Status of [bug 1021810|https://bugzilla.redhat.com/show_bug.cgi?id=1021810] from NEW to MODIFIED
> NoSuchMethodError at runtime due to eval in query (BW chaining)
> ---------------------------------------------------------------
>
> Key: DROOLS-178
> URL: https://issues.jboss.org/browse/DROOLS-178
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 5.5.0.Final
> Reporter: Wolfgang Laun
> Assignee: Mario Fusco
> Priority: Critical
> Fix For: 5.5.1.Final, 6.0.0.Final
>
>
> An eval CW in a query used in a BW chaining rule compiles, but causes a NoSuchMethodError when executed.
> Exception in thread "main" java.lang.NoSuchMethodError:
> pythagoras.Rule_isTriple_17ac16f7237046ee9562afce35dfe174.eval0(III)Z
> at pythagoras.Rule_isTriple_17ac16f7237046ee9562afce35dfe174Eval0InvokerGenerated.evaluate(Unknown
> Source)
> at pythagoras.Rule_isTriple_17ac16f7237046ee9562afce35dfe174Eval0Invoker.evaluate(Unknown
> Source)
> at org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:114)
> at org.drools.reteoo.EvalConditionNode.assertLeftTuple(EvalConditionNode.java:176)
> at org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:196)
> at org.drools.reteoo.SingleLeftTupleSinkAdapter.propagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:71)
> at org.drools.reteoo.JoinNode.propagateFromRight(JoinNode.java:159)
> at org.drools.reteoo.JoinNode.assertObject(JoinNode.java:148)
> at org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:497)
> at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:382)
> at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:235)
> at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:240)
> at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:350)
> at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:311)
> at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:903)
> at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:847)
> at org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:269)
> at pythagoras.Main.makeFacts(Main.java:94)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] (DROOLS-178) NoSuchMethodError at runtime due to eval in query (BW chaining)
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/DROOLS-178?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration updated DROOLS-178:
-------------------------------------------
Bugzilla Update: Perform
Bugzilla References: https://bugzilla.redhat.com/show_bug.cgi?id=1021810
> NoSuchMethodError at runtime due to eval in query (BW chaining)
> ---------------------------------------------------------------
>
> Key: DROOLS-178
> URL: https://issues.jboss.org/browse/DROOLS-178
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 5.5.0.Final
> Reporter: Wolfgang Laun
> Assignee: Mario Fusco
> Priority: Critical
> Fix For: 5.5.1.Final, 6.0.0.Final
>
>
> An eval CW in a query used in a BW chaining rule compiles, but causes a NoSuchMethodError when executed.
> Exception in thread "main" java.lang.NoSuchMethodError:
> pythagoras.Rule_isTriple_17ac16f7237046ee9562afce35dfe174.eval0(III)Z
> at pythagoras.Rule_isTriple_17ac16f7237046ee9562afce35dfe174Eval0InvokerGenerated.evaluate(Unknown
> Source)
> at pythagoras.Rule_isTriple_17ac16f7237046ee9562afce35dfe174Eval0Invoker.evaluate(Unknown
> Source)
> at org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:114)
> at org.drools.reteoo.EvalConditionNode.assertLeftTuple(EvalConditionNode.java:176)
> at org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:196)
> at org.drools.reteoo.SingleLeftTupleSinkAdapter.propagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:71)
> at org.drools.reteoo.JoinNode.propagateFromRight(JoinNode.java:159)
> at org.drools.reteoo.JoinNode.assertObject(JoinNode.java:148)
> at org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:497)
> at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:382)
> at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:235)
> at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:240)
> at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:350)
> at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:311)
> at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:903)
> at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:847)
> at org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:269)
> at pythagoras.Main.makeFacts(Main.java:94)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months