[JBoss JIRA] Created: (JBRULES-2589) running HonestPolitician from a Maven created eclipse project for drools-examples-drl => NoClassDefFoundError: XStream
by Jean-Marc Vanel (JIRA)
running HonestPolitician from a Maven created eclipse project for drools-examples-drl => NoClassDefFoundError: XStream
----------------------------------------------------------------------------------------------------------------------
Key: JBRULES-2589
URL: https://jira.jboss.org/browse/JBRULES-2589
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: FUTURE
Environment: % uname -a
Linux jmv-desktop 2.6.32-23-generic #37-Ubuntu SMP Fri Jun 11 08:03:28 UTC 2010 x86_64 GNU/Linux
% java -version
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed mode)
Reporter: Jean-Marc Vanel
Assignee: Mark Proctor
I made an eclipse project using Maven from drools-trunk/drools-examples/drools-examples-drl , and when running the class HonestPoliticianExample,
I have a NoClassDefFoundError: com/thoughtworks/xstream/XStream
The stack is :
Exception in thread "main" java.lang.NoClassDefFoundError: com/thoughtworks/xstream/XStream
at org.drools.audit.KnowledgeRuntimeLoggerProviderImpl.newFileLogger(KnowledgeRuntimeLoggerProviderImpl.java:10)
at org.drools.logger.KnowledgeRuntimeLoggerFactory.newFileLogger(KnowledgeRuntimeLoggerFactory.java:37)
at org.drools.examples.HonestPoliticianExample.main(HonestPoliticianExample.java:35)
The dependency com.thoughtworks.xstream is in drools-compiler/pom.xml , but only at the scope test !?!
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 8 months
[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, 8 months
[JBoss JIRA] Created: (JBRULES-2781) Optimization for sub-attributes in LHS conditions
by Frederico Ramos (JIRA)
Optimization for sub-attributes in LHS conditions
-------------------------------------------------
Key: JBRULES-2781
URL: https://jira.jboss.org/browse/JBRULES-2781
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-compiler, drools-core
Affects Versions: 5.1.0.FINAL
Environment: Windows XP & 7 Pro, Eclipse Galileo, JDK 1.6 update 21
Reporter: Frederico Ramos
Assignee: Mark Proctor
Priority: Minor
When building a simple rule, we discovered that the resulting "rete tree" did not reused some node conditions, dispite they are listed in the same order. After some different approaches we get to the expected tree using explicit predicates.
Shouldn't both alternatives generate the same tree? And if don't, can some optimization be created in Drools CORE to handle this?
Note that although the tree is different, it uses the same node types.
OPTION 1: OPTIMIZED RETE TREE
------
{{{
#created on: 09/11/2010
package aa
#list any import classes here.
import br.com.auster.om.invoice.telco.CallDetail;
import br.com.auster.om.invoice.telco.ServiceTypeEnum;
import br.com.auster.om.util.UnitCounter;
import br.com.auster.om.util.UnitCounter.TypeOfUnitEnum;
import br.com.auster.om.invoice.telco.TelcoCustomer;
rule "call duration check 1"
when
CallDetail( serviceType == ServiceTypeEnum.VOICE,
$realDuration : realDuration -> ($realDuration.getType() == TypeOfUnitEnum.TIME),
$billedDuration : billedDuration -> ($billedDuration.getType() == TypeOfUnitEnum.TIME),
realDuration.seconds <= 3 )
then
// TODO
end
rule "call duration check 2"
when
CallDetail( serviceType == ServiceTypeEnum.VOICE,
$realDuration : realDuration -> ($realDuration.getType() == TypeOfUnitEnum.TIME),
$billedDuration : billedDuration -> ($billedDuration.getType() == TypeOfUnitEnum.TIME),
realDuration.seconds > 3 )
then
// TODO
end
rule "call-duration-check - realDuration > 30"
when
CallDetail( serviceType == ServiceTypeEnum.VOICE,
$realDuration : realDuration -> ($realDuration.getType() == TypeOfUnitEnum.TIME),
$billedDuration : billedDuration -> ($billedDuration.getType() == TypeOfUnitEnum.TIME),
realDuration.seconds > 30 )
then
// TODO
end
}}}
OPTION 2: NOT-OPTIMIZED RETE TREE
------
{{{
#created on: 09/11/2010
package aa
#list any import classes here.
import br.com.auster.om.invoice.telco.CallDetail;
import br.com.auster.om.invoice.telco.ServiceTypeEnum;
import br.com.auster.om.util.UnitCounter;
import br.com.auster.om.util.UnitCounter.TypeOfUnitEnum;
import br.com.auster.om.invoice.telco.TelcoCustomer;
rule "call duration check 1"
when
CallDetail( serviceType == ServiceTypeEnum.VOICE,
$realDuration : realDuration.type == TypeOfUnitEnum.TIME,
$billedDuration : billedDuration.type == TypeOfUnitEnum.TIME,
realDuration.seconds <= 3 )
then
// TODO
end
rule "call duration check 2"
when
CallDetail( serviceType == ServiceTypeEnum.VOICE,
$realDuration : realDuration.type == TypeOfUnitEnum.TIME,
$billedDuration : billedDuration.type == TypeOfUnitEnum.TIME,
realDuration.seconds > 3 )
then
// TODO
end
rule "call-duration-check - realDuration > 30"
when
CallDetail( serviceType == ServiceTypeEnum.VOICE,
$realDuration : realDuration.type == TypeOfUnitEnum.TIME,
$billedDuration : billedDuration.type == TypeOfUnitEnum.TIME,
realDuration.seconds > 30 )
then
// TODO
end
}}}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 8 months