[JBoss JIRA] Created: (JBRULES-2398) Rule not fired when using 'in (0)' condition and another rule with condition ' == null' exists
by Jaroslaw Wosik (JIRA)
Rule not fired when using 'in (0)' condition and another rule with condition ' == null' exists
----------------------------------------------------------------------------------------------
Key: JBRULES-2398
URL: https://jira.jboss.org/jira/browse/JBRULES-2398
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-compiler (expert)
Affects Versions: 5.0.1.FINAL
Environment: Windows Xp Pro, Java 1.5.07
Reporter: Jaroslaw Wosik
Assignee: Mark Proctor
When following package is used:
package BROKEN_TEST;
import pl.wosik.conversion.BrokenTest.Holder;
rule "_12"
salience 3
activation-group "BROKEN"
when
$a : Holder(value in (0))
then
System.out.println("setting 0");
$a.setOutcome("setting 0");
end
rule "_13"
salience 2
activation-group "BROKEN"
when
$a : Holder(value in (1))
then
System.out.println("setting 1");
$a.setOutcome("setting 1");
end
rule "_22"
salience 1
activation-group "BROKEN"
when
$a : Holder(value == null)
then
System.out.println("setting null");
$a.setOutcome("setting null");
end
Rule "_12" will not be fired even when Holder.value is 0 because some strange interference between it's and rule _22's condition (note that _22 won't be fired as expected).
When "Holder(value in (0))" is changed into "Holder(value == 0)" or "Holder(value in (0,9))" or the whole rule_22 is removed rule _12 will be fired.
This issue is important as such seemingly strange "in (0)" condition can be generated from a decision table (as was in my case).
I will attach a self-contained Test Case.
--
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
13 years, 5 months
[JBoss JIRA] Created: (JBRULES-2462) Unable to read a properties file from DRL file
by Danny Shaw (JIRA)
Unable to read a properties file from DRL file
----------------------------------------------
Key: JBRULES-2462
URL: https://jira.jboss.org/jira/browse/JBRULES-2462
Project: Drools
Issue Type: Task
Security Level: Public (Everyone can see)
Reporter: Danny Shaw
Assignee: Mark Proctor
I am getting this error when my DRL file is attempting to read from a properties file
org.drools.runtime.rule.ConsequenceException: java.lang.NullPointerException
at org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:23)
at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:943)
at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:885)
at org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1086)
at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:660)
at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:627)
at org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:183)
Any suggestions then please let me know.
Thanks
--
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
13 years, 5 months
[JBoss JIRA] Created: (JBRULES-2321) Implicit binding and "or" CE in pattern cause ClassCastException
by Tihomir Surdilovic (JIRA)
Implicit binding and "or" CE in pattern cause ClassCastException
----------------------------------------------------------------
Key: JBRULES-2321
URL: https://jira.jboss.org/jira/browse/JBRULES-2321
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 4.0.7
Reporter: Tihomir Surdilovic
Assignee: Mark Proctor
This is a problem with Drools 4.0.7, it does not happen in Drools 5:
$factB.f1 is triggering a scenario where the engine creates an implicit biding to the "f1" field.
That in conjunction with the use of "or" is triggering the problem
rule "implicit bindings test"
when
FactA()
$factB : FactB( $fB : f1 )
(not FactC( f1 == $factB.f1 ) or FactC() )
then
end
The exception thrown is:
java.lang.ClassCastException: com.sample.FactAShadowProxy cannot be cast to com.sample.FactB
at org.drools.base.com.sample.FactB1865721816$getF1.getIntValue(Unknown Source)
at org.drools.base.extractors.BaseIntClassFieldExtractor.getHashCode(BaseIntClassFieldExtractor.java:85)
at org.drools.base.ClassFieldExtractor.getHashCode(ClassFieldExtractor.java:225)
at org.drools.rule.Declaration.getHashCode(Declaration.java:273)
at org.drools.util.AbstractHashTable$SingleIndex.hashCodeOf(AbstractHashTable.java:533)
at org.drools.util.TupleIndexHashTable.getOrCreate(TupleIndexHashTable.java:315)
at org.drools.util.TupleIndexHashTable.add(TupleIndexHashTable.java:227)
at org.drools.reteoo.NotNode.assertTuple(NotNode.java:93)
at org.drools.reteoo.CompositeTupleSinkAdapter.propagateAssertTuple(CompositeTupleSinkAdapter.java:30)
at org.drools.reteoo.JoinNode.assertObject(JoinNode.java:156)
at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:22)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:162)
at org.drools.reteoo.Rete.assertObject(Rete.java:175)
at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:192)
at org.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:71)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:911)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:883)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:684)
--
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
13 years, 5 months
[JBoss JIRA] Created: (JBRULES-2296) Infinite loop in OutputMarshaller
by Maciej Prochniak (JIRA)
Infinite loop in OutputMarshaller
---------------------------------
Key: JBRULES-2296
URL: https://jira.jboss.org/jira/browse/JBRULES-2296
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core, drools-core (expert)
Affects Versions: 5.1.0.M1
Reporter: Maciej Prochniak
Assignee: Mark Proctor
in OutputMarshaller, there are 2 lines containing:
for ( LeftTuple childLeftTuple = getLeftTuple( leftTuple.getBetaChildren() ); childLeftTuple != null; childLeftTuple = (LeftTuple) leftTuple.getLeftParentPrevious() ) {
it leads to infinite loop, should be:
for ( LeftTuple childLeftTuple = getLeftTuple( leftTuple.getBetaChildren() ); childLeftTuple != null; childLeftTuple = (LeftTuple) childLeftTuple.getLeftParentPrevious() ) {
--
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
13 years, 5 months
[JBoss JIRA] Created: (JBRULES-2265) running default "Hello" Drools Project
by shashank singh (JIRA)
running default "Hello" Drools Project
--------------------------------------
Key: JBRULES-2265
URL: https://jira.jboss.org/jira/browse/JBRULES-2265
Project: Drools
Issue Type: Task
Security Level: Public (Everyone can see)
Reporter: shashank singh
Assignee: Mark Proctor
In set up eclipse 3.5 as given on "http://www.jboss.org/tools/download" under "JBoss Tools 3.1 :: Eclipse 3.5.0"
Now when I am trying to set up a hello Drools Project I am getting this error
org.drools.RuntimeDroolsException: Unable to load dialect 'org.drools.rule.builder.dialect.java.Java
DialectConfiguration:java:org.drools.rule.builder.dialect.java.JavaDialectConfiguration'
at org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBuilderConfiguration.java:274)
at org.drools.compiler.PackageBuilderConfiguration.buildDialectConfigurationMap(PackageBuilderConfi
guration.java:259)
at org.drools.compiler.PackageBuilderConfiguration.init(PackageBuilderConfiguration.java:176)
at org.drools.compiler.PackageBuilderConfiguration.<init>(PackageBuilderConfiguration.java:153)
at org.drools.compiler.PackageBuilder.<init>(PackageBuilder.java:242)
at org.drools.compiler.PackageBuilder.<init>(PackageBuilder.java:142)
at org.drools.builder.impl.KnowledgeBuilderProviderImpl.newKnowledgeBuilder(KnowledgeBuilderProvide
rImpl.java:29)
at org.drools.builder.KnowledgeBuilderFactory.newKnowledgeBuilder(KnowledgeBuilderFactory.java:29)
at com.sample.DroolsTest.readKnowledgeBase(DroolsTest.java:39)
at com.sample.DroolsTest.main(DroolsTest.java:23)
Caused by: java.lang.RuntimeException: The Eclipse JDT Core jar is not in the classpath
at org.drools.rule.builder.dialect.java.JavaDialectConfiguration.setCompiler(JavaDialectConfigurati
on.java:94)
at org.drools.rule.builder.dialect.java.JavaDialectConfiguration.init(JavaDialectConfiguration.java
:55)
at org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBuilderConfiguration.java:270)
... 9 more
I would like to mention that while creating this application I added a DroolsRumtime and set it to C:\drools folder. But no jar was placed in that folder. I manually copied jars there. The jars that I copied are
drools-all-jdk5-2.1.jar
drools-ant-5.0.1.jar
drools-api-5.0.1.jar
drools-bam-5.0.1.jar
drools-clips-5.0.1.jar
drools-compiler-5.0.1.jar
drools-core-5.0.1.jar
drools-decisiontables-5.0.1.jar
drools-jsr94-5.0.1.jar
drools-mc-5.0.1.jar
drools-messenger-jms-5.0.1.jar
drools-persistence-jpa-5.0.1.jar
drools-process-task-5.0.1.jar
drools-templates-5.0.1.jar
drools-transformer-jaxb-5.0.1.jar
drools-transformer-jxls-5.0.1.jar
drools-verifier-5.0.1.jar
drools-workitems-5.0.1.jar
I am unable to make it is
IS installing JBoss Tools 3.0 or 3.1 means we are doing it for Drools4.0 or Drools5.0. And what is the dependency in this regard as such.
--
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
13 years, 5 months