[JBoss JIRA] Created: (JBRULES-2187) CLONE -Unusable error message during test scnario execution: Exception executing predicate org.drools.base.mvel.MVELPredicateExpression@739c6e
by Neil Wallace (JIRA)
CLONE -Unusable error message during test scnario execution: Exception executing predicate org.drools.base.mvel.MVELPredicateExpression@739c6e
----------------------------------------------------------------------------------------------------------------------------------------------
Key: JBRULES-2187
URL: https://jira.jboss.org/jira/browse/JBRULES-2187
Project: JBoss Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-guvnor
Affects Versions: 5.0.0.CR1
Reporter: Neil Wallace
Assignee: Mark Proctor
Priority: Minor
Fix For: 5.0.1.FINAL
With Guvnor 5.0.0.CR1 it seems that I have produced an error in a decision table which only appears during test scenario execution.
However the error message given in the browser (and on the console) is not very helpful:
{code}
2009-04-17 15:31:28,691 INFO [STDOUT] ERROR 17-04 15:31:28,690 (ServiceImplementation.java:runScenario:1875) org.drools.RuntimeDroolsException: Exception executing predicate org.drools.base.mvel.MVELPredicateExpression
{code}
As far as I know it's possible to extract the actual expression from MVELPredicateExpression and it would be nice if this gets printed so that users have a chance of fixing the problem. ;-)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 10 months
[JBoss JIRA] Created: (JBRULES-2186) CLONE -declaration of 2 variables in the init part of accumulate is not possible
by Neil Wallace (JIRA)
CLONE -declaration of 2 variables in the init part of accumulate is not possible
--------------------------------------------------------------------------------
Key: JBRULES-2186
URL: https://jira.jboss.org/jira/browse/JBRULES-2186
Project: JBoss Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-compiler
Affects Versions: 5.0.0.CR1
Reporter: Neil Wallace
Assignee: Edson Tirelli
Fix For: 5.0.1.FINAL
Take a rule with 2 variables int the init part, like
$maxCa:CompanyCA() from accumulate($ca:CompanyCA($year:year) from $p.cas,
init(ecrm.party.CompanyCA currentCA=null;int maxYear = 0;),
action(maxYear = Math.max(maxYear, $year);),
result(currentCA));
which can return the year and the ca where the ca is max.
It won't compile with the error that company CA is not declare.
The bug is in the class org.drools.rule.builder.dialect.java.JavaAccumulateBuilder
line 194
int index = 0;
for ( Iterator it = initCodeAnalysis.getLocalVariablesMap().entrySet().iterator(); it.hasNext(); ) {
Map.Entry entry = (Map.Entry) it.next();
attributes[index] = (String) entry.getKey();
attributesTypes[index] = ((JavaLocalDeclarationDescr) entry.getValue()).getType();
}
when the variables are put in the context, only the first is put (index stay at 0)
We should increment the index
int index = 0;
for ( Iterator it = initCodeAnalysis.getLocalVariablesMap().entrySet().iterator(); it.hasNext(); ) {
Map.Entry entry = (Map.Entry) it.next();
attributes[index] = (String) entry.getKey();
attributesTypes[index] = ((JavaLocalDeclarationDescr) entry.getValue()).getType();
index ++;
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 10 months
[JBoss JIRA] Created: (JBRULES-2185) CLONE -Collection returned by StatefulKnowledgeSession.getObjects() doesn't conform to standard collection behaviour
by Neil Wallace (JIRA)
CLONE -Collection returned by StatefulKnowledgeSession.getObjects() doesn't conform to standard collection behaviour
--------------------------------------------------------------------------------------------------------------------
Key: JBRULES-2185
URL: https://jira.jboss.org/jira/browse/JBRULES-2185
Project: JBoss Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 5.0.0.CR1
Reporter: Neil Wallace
Assignee: Mark Proctor
Fix For: 5.0.1.FINAL
StatefulKnowledgeSession.getObjects() returns a collection containing the objects in working memory.
The Javadoc for Collection.contains says:
"Returns true if this collection contains the specified element. More formally, returns true if and only if this collection contains at least one element e such that (o==null ? e==null : o.equals(e)). "
This is not the case though for StatefulKnowledgeSessionImpl.ObjectStoreWrapper. The implementation of contains returns true only if it is the exact same object instance, but false if it is a different instance but which equals the instance in the working memory.
A workaround is to create a new collection and put the items returned into that.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 10 months
[JBoss JIRA] Created: (JBRULES-2183) CLONE -XOR Split not working properly inside CompositeNode
by Neil Wallace (JIRA)
CLONE -XOR Split not working properly inside CompositeNode
----------------------------------------------------------
Key: JBRULES-2183
URL: https://jira.jboss.org/jira/browse/JBRULES-2183
Project: JBoss Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core (flow)
Affects Versions: 5.0.0.M5, 5.0.0.CR1
Environment: java.version = 1.6.0_11
java.vm.name = Java HotSpot(TM) Client VM
Windows Vista Service Pack 1
Reporter: Neil Wallace
Assignee: Kris Verlaenen
Fix For: 5.0.1.FINAL
If XOR Split node is used inside CompositeNode the following exception occurs regardless of the fact that at least one outgoing condition _is_ fulfilled:
java.lang.IllegalArgumentException: XOR split could not find at least one valid outgoing connection for split Split
at org.drools.workflow.instance.node.SplitInstance.internalTrigger(SplitInstance.java:72)
at org.drools.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:111)
at org.drools.workflow.instance.impl.NodeInstanceImpl.triggerConnection(NodeInstanceImpl.java:141)
at org.drools.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:128)
at org.drools.workflow.instance.node.ActionNodeInstance.triggerCompleted(ActionNodeInstance.java:62)
at org.drools.workflow.instance.node.ActionNodeInstance.internalTrigger(ActionNodeInstance.java:58)
at org.drools.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:111)
The accompanying attachment 'drools-xor-bug.zip' contains an example that reproduces the problem.
Zip file contains the eclipse project - simply import it in Eclipse and run com.sample.RuleFlowTest.java.
There are two .rf files. normalXOR.rf contains a working process, using XOR Split outside of CompositeNode. weirdXOR.rf contains the same XOR Split branching and outgoing constraints, but is positioned within CompositeNode.
RuleFlowTest first successfully executes normalXOR flow, then fails while executing weirdXOR flow.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 10 months
[JBoss JIRA] Created: (JBRULES-2181) CLONE -Race conditions in AbstractRuleBase
by Neil Wallace (JIRA)
CLONE -Race conditions in AbstractRuleBase
------------------------------------------
Key: JBRULES-2181
URL: https://jira.jboss.org/jira/browse/JBRULES-2181
Project: JBoss Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core (expert)
Affects Versions: 5.0.0.CR1
Environment: Windows, Drools CR1
Reporter: Neil Wallace
Assignee: Edson Tirelli
Fix For: 5.0.1.FINAL
ReteooRuleBaseMultiThreadedTest is failing because of race conditions in AbstractRuleBase
java.lang.NullPointerException
at org.drools.common.AbstractRuleBase.lock(AbstractRuleBase.java:408)
at org.drools.common.AbstractRuleBase.removePackage(AbstractRuleBase.java:655)
at org.drools.reteoo.ReteooRuleBaseMultiThreadedTest$PackageModifier.doOperation(ReteooRuleBaseMultiThreadedTest.java:143)
at org.drools.reteoo.ReteooRuleBaseMultiThreadedTest$BlockedThread.run(ReteooRuleBaseMultiThreadedTest.java:121)
junit.framework.AssertionFailedError: Exception in modifier thread expected:<false> but was:<true>
at org.drools.reteoo.ReteooRuleBaseMultiThreadedTest.testNewSessionWhileModifyingRuleBase(ReteooRuleBaseMultiThreadedTest.java:80)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 10 months