dependency issue after upgrading to 4.0.0 from MR3 with maven2?
by Eric Miles
I am attempting to ween our project off of MR3 and on to the 4.0.0 GA
and am having a lot of difficulty. First off, I had compile issues with
the PackageBuilderConfiguration class (attempting to set the compliance
level to 1.5). I figured that was no longer necessary so I removed that
(I hope that's correct although I haven't seen this mentioned anywhere).
Now when I attempt to run a unit test, I get the following error:
org.drools.RuntimeDroolsException: Unable to load dialect
'org.drools.rule.builder.dialect.java.JavaDialectConfiguration:java'
at
org.drools.compiler.PackageBuilderConfiguration.buildDialectRegistry(PackageBuilderConfiguration.java:138)
at
org.drools.compiler.PackageBuilderConfiguration.init(PackageBuilderConfiguration.java:114)
at
org.drools.compiler.PackageBuilderConfiguration.<init>(PackageBuilderConfiguration.java:87)
at
com.kronos.webta.service.key.rules.AccountKeyLookupTest.setUpBeforeClass(AccountKeyLookupTest.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.junit.internal.runners.BeforeAndAfterRunner.invokeMethod(BeforeAndAfterRunner.java:74)
at
org.junit.internal.runners.BeforeAndAfterRunner.runBefores(BeforeAndAfterRunner.java:50)
at
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:33)
at
org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: java.lang.RuntimeException: The Eclipse JDT Core jar is not
in the classpath
at
org.drools.rule.builder.dialect.java.JavaDialectConfiguration.setCompiler(JavaDialectConfiguration.java:98)
at
org.drools.rule.builder.dialect.java.JavaDialectConfiguration.init(JavaDialectConfiguration.java:56)
at
org.drools.compiler.PackageBuilderConfiguration.buildDialectRegistry(PackageBuilderConfiguration.java:134)
... 17 more
I am using Maven2, so I would assume my dependencies would be taken care
of? I'm only using 2 dependencies in my project for Drools:
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-compiler</artifactId>
<version>4.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-core</artifactId>
<version>4.0.0</version>
<scope>compile</scope>
</dependency>
>From the following repo:
<repository>
<id>jboss</id>
<name>JBoss maven repository</name>
<url>http://repository.jboss.com/maven2</url>
</repository>
Am I missing something? I completely blew away my org.drools directory
in my local repository to allow maven2 to download the dependencies, I
see it's downloading the drools-compiler and drools-core 4.0.0 versions
(although they do not have associated poms or checksums which I find
odd). Thanks!
Eric
17 years, 5 months
Quick syntax question
by Eric Miles
Is there an easier way to write this LHS?
Class(name == 'com.mycompany.SomeClass')
It would be nice to do something like this:
Class(name == SomeClass.class.getName())
Suggestions?
Thanks all!
17 years, 5 months
Unhappy (hoppy?) jackrabbit
by Wagner Rick - rwagne
Fernando,
Thanks for the tip about JSF dependencies-- I believe I've gotten past
that error with the BRMS. (Downloaded JSF1.3 and copied jsf-api.jar and
jsf-impl.jar to Tomcat's lib directory. I also threw in commons
beanutils, collections, and digester per a web posting I'd found that
advocated these actions.)
So now JSF and Tomcat are happy, I can run the sample JSF apps just
fine. Back to the BRMS!
It seems JackRabbit is unhappy-- it's complaining about the empty
custom_nodetypes.xml file I've got in Tomcat's
bin/repository/repository/nodetypes directory. Here's the stacktrace:
Jul 26, 2007 8:44:18 AM org.apache.catalina.core.StandardContext
listenerStart
SEVERE: Exception sending context initialized event to listener instance
of class org.jboss.seam.servlet.SeamListener
org.drools.repository.RulesRepositoryException:
javax.jcr.RepositoryException: internal error: failed to read custom
node type definitions stored in custom_nodetypes.xml: Premature end of
file.: Premature end of file.
at
org.drools.brms.server.repository.BRMSRepositoryConfiguration.newSession
(BRMSRepositoryConfiguration.java:91)
I'm afraid I'm new to Jackrabbit, so I tried downloading and building
the given release (1.3) and supplying a valid custom_nodetypes.xml from
the build-- of course that didn't work. Neither did removing the parts
of that file that seemed specific to the Jackrabbit build.
Can you please point me in the right direction?
Thanks much,
Rick
*************************************************************************
The information contained in this communication is confidential, is
intended only for the use of the recipient named above, and may be
legally privileged.
If the reader of this message is not the intended recipient, you are
hereby notified that any dissemination, distribution or copying of this
communication is strictly prohibited.
If you have received this communication in error, please resend this
communication to the sender and delete the original message or any copy
of it from your computer system.
Thank you.
*************************************************************************
17 years, 5 months
Does when order matter?
by Ronald R. DiFrango
All,
I was wondering [and maybe this has be answered before] ,but does the order
of the rules in the when clause matter?
For example I have the following:
rtvHeader : RtvHeader( headerRtvNumber : rtvNumber )
repaymentCode : RepaymentCode( actualCode : code, matchApprv != "Y"
)
lineCharge : HeaderAdditionalCharge( rtvNumber == headerRtvNumber,
originalRepaymentCode == actualCode )
In my case there is a higher likelihood that I will have more RepaymentCodes
than RtvHeaders [1 of these guys] and likely less HeaderAdditionalCharge
objects. So should the order be more like:
rtvHeader : RtvHeader( headerRtvNumber : rtvNumber )
lineCharge : HeaderAdditionalCharge( rtvNumber == headerRtvNumber,
originalRepaymentCode : originalRepaymentCode)
repaymentCode : RepaymentCode( actualCode == originalRepaymentCode,
matchApprv != "Y" )
Or does it not really matter?
Thanks in advance,
Ron
17 years, 5 months
"Trying to create a restriction for an empty restriction" error
by Yuri
I am migrating my 3.0.6 rules into 4.0 but I am getting the following error in
Drools IDE:
"Trying to create a restriction for an empty restriction"
I am basically using an inline-eval (I believe this is the new terminology for
the ->() construct):
Rule
when
c1:Child()
c2:Child(
age -> (Math.abs(age - c1.age) < 10),
...)
then
...
end
If I remove the "age -> ..." line the error goes away.
Along the same lines I am also wondering if there is a better way (aside from
using "->()", which has a lower perf as I understand it) of doing the following:
Rule
when
p1: Person()
p2: Person(
...,
sex -> (
(sex == "M" && p1.sex == "F")
|| (sex == "F" && p1.sex == "M")
)
)
then
insert(new Couple(p1, p2));
end
thanks,
17 years, 5 months
EJB's/Distributes Objects in Working Memory?
by Arjun Dhar
Hi,
Q1. we all use POJOS in the Working Memory. Theoretically is it even possoble
to experiment with distributed objects in the working memory running in a JVM?
At the end its an object, but well... :)
Q2. Another question, with DSL, Decsion Tables, Rule Flows. Where does the
JBoss Rules dev team commitment lie most? I need to ask this coz everyone has
their preference but where support is; one should go! (example: Decsion tables
still does not Support agenda groups and 'from', I've had to develop work
arounds); so where does the commitment lie?
thanks,
Arjun
17 years, 5 months
JBoss Drools 4.0 Released
by Mark Proctor
JBoss Drools 4.0 has just been released :) We are really proud of what
we have done here. We believe that we now have the best and most
powerful declarative rule language, bar none; commercial or open source.
The Rule Flow is excellent and I really enjoyed updating the Conway's
Game of Life to Rule Flow; sub Rule Flows and milestone support will be
coming in a point release soon. The BRMS has long been requested and we
put a lot of effort into the ajax based design. The Eclipse improvements
for the debug points and guided editor should help reduce learning
curves, opening us to new audiences. Of course performance is now much
better, especially for complex rules and the new Sequential Mode should
be very popular with decision services.
Boss Drools 4.0 can be summarised as:
* More expressiveness.
* More powerful declarative keywords.
* Hibernate ready, with 'from' keyword for evaluating external data.
* Pluggable dialects, with new MVEL dialect.
* New Rule Flow and Eclipse modeller.
* Better Performance.
* IDE Improvements.
* Enterprise Ready with Web 2.0 Business Rules Management Studio.
Resources:
* Presentation from Skills Matter
http://wiki.jboss.org/wiki/attach?page=JBossRules%2FSkillsMatter20070711.pdf
* What's new in JBoss Rules 4.0
http://wiki.jboss.org/wiki/attach?page=JBossRules%2Fwhats_new_in_jbossrul...
Enjoy :)
The Drools Team
Mark Proctor, Michael Neale, Edson Tirelli, Kris Verlaenen, Fernando Meyer
http://blog.athico.com
Here is a more detailed enhancements list:
Language Expressiveness Enhancements
* New Conditional Elements: from(hibernate ready), collect, accumulate
and forall
* New Field Constraint operators: not matches, not contains, in, not in,
memberOf, not memberOf
* New Implicit Self Reference field: this
* Full support to Conditional Elements nesting, for First Order Logic
completeness.
* Support to multi-restrictions and constraint connectives && and ||
* Parser improvements to remove previous language limitations, like
character escaping and keyword conflicts
* Support to pluggable dialects and built-in support to Java and MVEL
* Complete rewrite of DSL engine, allowing for full l10n
* Fact attributes auto-vivification for return value restrictions and
inline-eval constraints
* Support to nested accessors, property navigation and simplified
collection, arrays and maps syntax
* Improved support to XML rules
* Experimental Clips parser support
Core Engine Enhancements
* Native support to primitive types, avoiding constant autoboxing
* Transparent optional Shadow Facts
* Rete Network performance improvements for complex rules
* Rule-Flow
* Stateful and Stateless working memories (rule engine sessions)
* Support for Asynchronous Working Memory actions
* Rules Engine Agent for hot deployment and BRMS integration
* Pluggeable dialects and and full support to MVEL scripting language
* Dynamic salience for rules conflict resolution
* Parameterized Queries
* halt command
* Sequential execution mode, faster performance and uses less memory
* Pluggable global variable resolver
IDE Enhancements
* Support for rule break-points on debugging
* WYSIWYG support to rule-flows
* New guided editor for rules authoring
* Upgrade to support all new engine features
Business Rules Management System - BRMS
* User friendly web interface with nice WEB 2.0 ajax features (GWT)
* Package configuration
* Rule Authoring easy to edit rules both with guided editor ( drop-down
menus ) and text editor
* Package compilation and deployment
* Easy deployment with Rule Agent
* Easy to organize with categories and search assets
* Versioning enabled, you can easily replace yours assets with
previously saved
* JCR compliant rule assets repository
Miscellaneous Enhancements
* Slimmed down dependencies and smaller memory footprint
17 years, 5 months
or split
by hypnosat7
Hi,
When I set the split type to OR I have this exception :
Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException:
org.drools.common.RuleFlowGroupNode cannot be cast to
org.drools.spi.Activation
What it could be
--
View this message in context: http://www.nabble.com/or-split-tf4142836.html#a11784787
Sent from the drools - user mailing list archive at Nabble.com.
17 years, 5 months
problems using rule flow
by hypnosat7
When I use my rule flow with only one asserted fact it work very well, but
when I assert more than one fact it goes wrong. I used the Audit View to fix
the problem.
My rule flow : Start -> ruleFlowGroup1 -> split -> ruleFlowGroup2 ....
-> join ....
When I edit my split node I have this :
To node ruleFlowGroup2 : constraint
To node join : constraint
For the node join constraint I specified something like :
myFact(state==myFact.state1)
And when a fact with state==myFact.state1 is inserted the split node
constraint are true for the others facts even if their states are different
from myFact.state.
I'm also updating my fact in all the rules.
So my question is, how can I say to the split node to consider the fact
outgoing from the ruleFlowGroup1 and not a fact in the working memory ????
Thanks
Any help pls ?
--
View this message in context: http://www.nabble.com/problems-using-rule-flow-tf4128169.html#a11739566
Sent from the drools - user mailing list archive at Nabble.com.
17 years, 5 months