[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
14 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
14 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
14 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
14 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
14 years, 10 months
[JBoss JIRA] Created: (JBRULES-2180) CLONE -Default Guvnor repository path in Eclipse webdav plugin differs from Guvnors actual path.
by Neil Wallace (JIRA)
CLONE -Default Guvnor repository path in Eclipse webdav plugin differs from Guvnors actual path.
------------------------------------------------------------------------------------------------
Key: JBRULES-2180
URL: https://jira.jboss.org/jira/browse/JBRULES-2180
Project: JBoss Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-eclipse, drools-guvnor
Affects Versions: 5.0.0.CR1
Environment: Windows XP SP3 with Sun JDK 1.5.0_15. Eclipse Version: 3.4.1 Build id: M20080911-1700. Note that the Guvnor was running under JBoss AS 4.2.2.
Reporter: Neil Wallace
Assignee: Kris Verlaenen
Fix For: 5.0.1.FINAL
This isn't really a bug, but more of a configuration issue.
The default repository location displayed by the "Guvnor Repository Location" wizard in Eclipse is not the default location used by the Guvnor distributed under the drools project. Consequently, if you accept the default value in the wizard, it is likely you will not be able to connect to the repository running under the Guvnor. The default repository location in the wizard is:
/jboss-brms/org.drools.guvnor.Guvnor/webdav
However, the default location to connect to the drools Guvnor is:
/drools-guvnor/org.drools.guvnor.Guvnor/webdav
as the default URL for the Guvnor is:
http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/Guvnor.html
It is not obvious at first what is wrong, as if you accept the default repository location then the new location appears in the Guvnor Repositories view. But when you click on this repository name to browse it you get the following error:
"Server not reachable"
I initially assumed it was a network issue, or the wrong port (8080) etc. Only after careful inspection is it obvious that the default repository location in the Eclipse wizard does not match the default URL used by the drools Guvnor.
There has been some discussion related to this under the JIRA GUVNOR-120, but I'm not sure if there is a conflict between the solution suggested in that JIRA and the issue raised here.
To Reproduce Problem
============================
This assumes that the Guvnor is running locally at localhost:8080 which is the default location "out of the box".
1. Link to the Guvnor by selecting the menu option to run the "Guvnor Repository Location" wizard: File, New, Other, Guvnor, Guvnor Repository Location.
2. I accepted the defaults, adding only user and password:
Location: localhost
Port: 8080
Repository: /jboss-brms/org.drools.guvnor.Guvnor/webdav
User Name: admin
Password: admin
Selected to save password
Click Finish and the link is created successfully in the "Guvnor Repositories" view as:
http://localhost:8080/jboss-brms/org.drools.guvnor.Guvnor/webdav
3. Click on the link above. This causes the following error:
"Server not reachable"
Notice that the URL for the link says jboss-brms instead of drools-guvnor.
4. Delete the link you just created and perform steps 1 and 2 again, but this time set the Repository value in step 2 as:
/drools-guvnor/org.drools.guvnor.Guvnor/webdav
5. Click on the new link above. This should allow you to browse the repository on the Guvnor side correctly.
--
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
14 years, 10 months
[JBoss JIRA] Created: (JBRULES-2177) CLONE -NPE in compiler for fact class w/o getters/setters
by Neil Wallace (JIRA)
CLONE -NPE in compiler for fact class w/o getters/setters
----------------------------------------------------------
Key: JBRULES-2177
URL: https://jira.jboss.org/jira/browse/JBRULES-2177
Project: JBoss Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-compiler (expert)
Affects Versions: 5.0.0.CR1
Environment: any
Reporter: Neil Wallace
Assignee: Edson Tirelli
Fix For: 5.0.1.FINAL
A class with missing getters and setters, e.g.:
public class Command {
protected String ident;
protected Code code;
protected boolean refused;
protected String reason;
public Command( String id, Code c ){
ident = id;
code = c;
}
}
used in a rule pattern such as, e.g.:
rule cleanupRefused
when
$c : Command( $i : ident, refused == true, $r : reason )
then
# whatever
end
causes a NPE in Declaration:239 due to Declaration.readAccessor == null
This should produce a compiler error message.
NOTICE: Javadoc on constructors of class Declaration is incorrect!
--
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
14 years, 10 months