[JBoss JIRA] Created: (JBRULES-1482) Bug with ReeteoRuleBase and merged package
by Delbart Vincent (JIRA)
Bug with ReeteoRuleBase and merged package
------------------------------------------
Key: JBRULES-1482
URL: http://jira.jboss.com/jira/browse/JBRULES-1482
Project: JBoss Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Reteoo
Affects Versions: 4.0.4
Environment: doesn't matter
Reporter: Delbart Vincent
Assigned To: Mark Proctor
Priority: Critical
The two same rule (with identical name) appears two times in the ReteeoRuleBase (reteooBuilder)
example :
package1 (name = "globalPackage)
- rule1 (name="rule1")
when
then
System.out.println("rule1 for the package1")
package2 (name = "globalPackage)
- rule2 (name="rule1")
when
then
System.out.println("rule2 for the package2")
when I add this two packages in the same RuleBase and execute :
RuleBase ruleBase = RuleBaseFactory.newRuleBase();
ruleBase.add(package1);
ruleBase.add(package2);
the log out is :
rule1 for the package1
rule2 for the package2
The error is not in the mergePackage method in the AbstractRuleBase but in the addPackage(final Package newPkg) line 425.
thanks,
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 2 months
[JBoss JIRA] Created: (JBRULES-1477) User exception thrown from inside a rule always causes a stackTrace to console
by Dominic Staples (JIRA)
User exception thrown from inside a rule always causes a stackTrace to console
------------------------------------------------------------------------------
Key: JBRULES-1477
URL: http://jira.jboss.com/jira/browse/JBRULES-1477
Project: JBoss Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 4.0.4
Environment: WindowsXP; Drools 4-0-4; Example run from inside Eclipse 3-3-1-1.
Reporter: Dominic Staples
Assigned To: Mark Proctor
Priority: Optional
I asked for (and immediately received - Thanks!) some assistance via the Drools IRC webclient regarding throwing exceptions inside rules.
I now know that this is probably a bad thing in most cases, however one of my queries at the time was how to stop the stacktrace being sent to the console even though the exception was successfuly caught at the .fireAllRules() invocation.
It was suggested that this was a bug, and could I submit a JIRA - here it is.
Attached is a very basic re-create of the situation. I'm running Drools 4.0.4.
As I've managed to convince my team mates that throwing exceptions from inside rules is a bad thing, I won't be waiting for a fix :-)
Thanks for a great product,
Dom Staples.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 2 months
[JBoss JIRA] Created: (JBRULES-1460) MVEL parser uses wrong precedence for []
by Godmar Back (JIRA)
MVEL parser uses wrong precedence for []
----------------------------------------
Key: JBRULES-1460
URL: http://jira.jboss.com/jira/browse/JBRULES-1460
Project: JBoss Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 4.0.4
Reporter: Godmar Back
Consider this .drl file:
--
package test;
import java.util.ArrayList;
import java.util.HashMap;
dialect "mvel"
rule "Rule #1"
when
then
m = new HashMap();
l = new ArrayList();
l.add("first");
m.put("content", l);
System.out.println(m["content"][0]);
end
---
which produces:
org.mvel.PropertyAccessException: unable to resolve property: out.println(m["content"][0])
at org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:285)
at org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeAccessor(ReflectiveAccessorOptimizer.java:107)
at org.mvel.ast.LiteralDeepPropertyNode.getReducedValueAccelerated(LiteralDeepPropertyNode.java:26)
at org.mvel.MVELRuntime.execute(MVELRuntime.java:88)
at org.mvel.CompiledExpression.getValue(CompiledExpression.java:107)
at org.mvel.MVEL.executeExpression(MVEL.java:223)
at org.drools.base.mvel.MVELConsequence.evaluate(MVELConsequence.java:47)
at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:550)
at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:514)
at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:471)
at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:433)
at org.libx.autodetect.DroolsDriver$Host.fireAllRules(DroolsDriver.java:63)
at org.libx.autodetect.DroolsDriver.main(DroolsDriver.java:135)
Caused by: org.mvel.PropertyAccessException: unable to resolve property: unable to resolve method: java.io.PrintStream.println(java.util.ArrayList, org.mvel.util.FastList) [arglength=2]
at org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.getMethod(ReflectiveAccessorOptimizer.java:558)
at org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:257)
... 12 more
Exception in thread "main" org.drools.spi.ConsequenceException: org.mvel.PropertyAccessException: unable to resolve property: out.println(m["content"][0])
at org.drools.base.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:14)
at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:554)
at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:514)
at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:471)
at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:433)
at org.libx.autodetect.DroolsDriver$Host.fireAllRules(DroolsDriver.java:63)
at org.libx.autodetect.DroolsDriver.main(DroolsDriver.java:135)
Caused by: org.mvel.PropertyAccessException: unable to resolve property: out.println(m["content"][0])
at org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:285)
at org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeAccessor(ReflectiveAccessorOptimizer.java:107)
at org.mvel.ast.LiteralDeepPropertyNode.getReducedValueAccelerated(LiteralDeepPropertyNode.java:26)
at org.mvel.MVELRuntime.execute(MVELRuntime.java:88)
at org.mvel.CompiledExpression.getValue(CompiledExpression.java:107)
at org.mvel.MVEL.executeExpression(MVEL.java:223)
at org.drools.base.mvel.MVELConsequence.evaluate(MVELConsequence.java:47)
at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:550)
... 5 more
Caused by: org.mvel.PropertyAccessException: unable to resolve property: unable to resolve method: java.io.PrintStream.println(java.util.ArrayList, org.mvel.util.FastList) [arglength=2]
at org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.getMethod(ReflectiveAccessorOptimizer.java:558)
at org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:257)
... 12 more
but changing:
System.out.println(m["content"][0]);
to
System.out.println((m["content"])[0]);
works. (So does assigning m["content"] to a temporary variable.)
BTW: if you say that's a MVEL issue, not a Drools issue, consider that I have no other reason to use MVEL than to be able to use Drools. That's why I filed this bug here. I don't know how to run MVEL in any other environment, nor am I interested in it - I'd rather use a mature scripting language (beanshell comes to mind) that doesn't exhibit such basic bugs. Why don't you?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 2 months
[JBoss JIRA] Created: (JBPORTAL-1927) IdentityUIConfigurationServiceImpl : better logs of exception, for better config debugging
by Antoine Herzog (JIRA)
IdentityUIConfigurationServiceImpl : better logs of exception, for better config debugging
------------------------------------------------------------------------------------------
Key: JBPORTAL-1927
URL: http://jira.jboss.com/jira/browse/JBPORTAL-1927
Project: JBoss Portal
Issue Type: Task
Security Level: Public (Everyone can see)
Components: Portal Identity
Affects Versions: 2.6.4 Final
Environment: JBP 2.6.4
Reporter: Antoine Herzog
Priority: Minor
Fix For: 2.6.5 Final
In class : IdentityUIConfigurationServiceImpl
the exception handling is not re throwing the cause of the exception.
hence, the error (in config) are quite difficult to understant and debug.
would be great to add the cause exception in the "throw new xxxException('bla bla');"
example :
line 337
catch (JBossXBException e)
{
throw new CoreIdentityConfigurationException("Could not parse configuration file.");
}
would be better :
catch (JBossXBException e)
{
throw new CoreIdentityConfigurationException("Could not parse configuration file.", e);
}
everywhere in the file : add the ", e);" in all the new exception throw
Thanks,
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 2 months