RE: [rules-users] Out of Memory Issue of JBoss Engine deployed on IBMWAS 6.0.2.7
by Dejia Wang
BTW, I am using the JBoss Rules 3.0.5.
_____
From: Dejia Wang
Sent: Monday, January 15, 2007 3:56 PM
To: rules-users(a)lists.jboss.org
Subject: [rules-users] Out of Memory Issue of JBoss Engine deployed on
IBMWAS 6.0.2.7
Importance: High
Hi All,
I ran into OOM (Out of Memory) issue of JBoss Rule Engine deployed on
IBM WAS 6.0.2.7. Below is the log
...
[Loaded org.antlr.runtime.DFA from
file:/D:/WebSphere/AppServer/profiles/AppSrv01/installedApps/xxxNode02Ce
ll/xxx.ear/lib/antlr-3.0ea8.jar]
[Loading superclass and interfaces of org/antlr/runtime/DFA]
[Preparing org/antlr/runtime/DFA]
[Loaded org.antlr.runtime.DFA$State from
file:/D:/WebSphere/AppServer/profiles/AppSrv01/installedApps/xxxNode02Ce
ll/xxxApplications.ear/lib/antlr-3.0ea8.jar]
[Loading superclass and interfaces of org/antlr/runtime/DFA$State]
[Loaded org.drools.lang.RuleParserLexer$1 from
file:/D:/WebSphere/AppServer/profiles/AppSrv01/installedApps/xxxNode02Ce
ll/xxxApplications.ear/lib/drools-compiler-3.0.jar]
[Loading superclass and interfaces of org/drools/lang/RuleParserLexer$1]
[Loaded org.drools.lang.RuleParserLexer$2 from
file:/D:/WebSphere/AppServer/profiles/AppSrv01/installedApps/xxxNode02Ce
ll/ xxxApplications.ear/lib/drools-compiler-3.0.jar]
[Loading superclass and interfaces of org/drools/lang/RuleParserLexer$2]
[Loaded org.drools.lang.RuleParserLexer$3 from
file:/D:/WebSphere/AppServer/profiles/AppSrv01/installedApps/xxxNode02Ce
ll/ xxxApplications.ear/lib/drools-compiler-3.0.jar]
[Loading superclass and interfaces of org/drools/lang/RuleParserLexer$3]
[Loaded org.drools.lang.RuleParserLexer$4 from
file:/D:/WebSphere/AppServer/profiles/AppSrv01/installedApps/xxxNode02Ce
ll/ xxxApplications.ear/lib/drools-compiler-3.0.jar]
[Loading superclass and interfaces of org/drools/lang/RuleParserLexer$4]
....
[Loaded org.drools.lang.RuleParserLexer$228 from
file:/D:/WebSphere/AppServer/profiles/AppSrv01/installedApps/xxxNode02Ce
ll/xxxApplications.ear/lib/drools-compiler-3.0.jar]
[Loading superclass and interfaces of
org/drools/lang/RuleParserLexer$228]
...
It looks like it loaded the same class hundreds of times until it
exhausts the memory.
Any idea why this happens and how to fix this?
Thanks- Dejia
17 years, 11 months
Problems parsing rules with brackets
by bret
Hi,
We are having issues with Drools where we have rules with brackets in the
"when" part of the rule.
For example...
rule "brackets"
when
not ((DoubleFact(name == "a_fact", value > 60) or
StringFact(name == "another_fact", value !=
"EMPLOYED"))
and DoubleFact(name == "yet_another", value < 10))
then
assert(new PolicyViolation("Badness", "Blah"));
end
(The NOT line originally does not have line breaks, all of the when clause
is on one line)
This will cause a parse error and it complains about the bracket after the
NOT and at the end of the line.
Why can't drools deal with this??
--
View this message in context: http://www.nabble.com/Problems-parsing-rules-with-brackets-tf3014886.html...
Sent from the drools - user mailing list archive at Nabble.com.
17 years, 11 months
Re: [drools-dev] 3.2 M1
by Dirk Bergstrom
Michael Neale was heard to exclaim, On 01/02/07 05:28:
> Guys, I am ok to do a M1 release of 3.2 whenever needed
Any news on this? I've been running (in production now) on code I pulled from
trunk a month or so ago, and it throws NPEs now and again. I'd really like to
get something a bit more stable. Today's trunk "revision 8842" doesn't build,
because the mvel code is Java 1.5.
I'm kinda stuck here, and I'm hoping that someone can throw me a bone. If M1
isn't coming soon, was there a particular revision number that was fairly stable
that I can use?
--
Dirk Bergstrom dirk(a)juniper.net
_____________________________________________
Juniper Networks Inc., Computer Geek
Tel: 408.745.3182 Fax: 408.745.8905
17 years, 11 months
Unable To Resolve Object Type
by Paul O'Connor
I have a Drools web service that I wrote using Axis2 version 1.1. Upgrading
to Axis2 1.1 breaks rule compilation with a "Unable To Resolve Object Type"
error enumerated below:
org.drools.rule.InvalidRulePackage: Unable to resolve ObjectType 'Product'
Unable to resolve ObjectType 'Account'
Unable to resolve ObjectType 'Product'
Unable to resolve ObjectType 'Account'
Unable to resolve ObjectType 'Product'
Unable to resolve ObjectType 'Account'
Unable to resolve ObjectType 'Product'
Unable to resolve ObjectType 'Account'
Unable to resolve ObjectType 'Product'
Unable to resolve ObjectType 'Account'
Unable to resolve ObjectType 'Product'
Unable to resolve ObjectType 'Account'
Unable to resolve ObjectType 'Product'
Unable to resolve ObjectType 'Account'
Unable to resolve ObjectType 'Product'
And there is a suspicious reference to a Drools class missing in the
compiler error message:
Rule Compilation error Class "org.drools.spi.KnowledgeHelper" not found
Class "o
rg.drools.spi.KnowledgeHelper" not found Unknown variable or type "result"
Class
"java.lang.Object" has no method named "setBasisPoints" Expression "result"
is
not an rvalue Expression "result" is not an rvalue Expression "result" is
not an
rvalue Unknown variable or type "result" Unknown variable or type "result"
Clas
s "java.lang.Object" has no method named "setReason" Expression "result" is
not
an rvalue Expression "result" is not an rvalue Expression "result" is not an
rva
lue Unknown variable or type "result" Exception:14 errors while compiling
unit "
com/foo/bar/Rule_Bump_Rate_22_0.java"
My First thought was that there was a classloader scoping issue introduced
in Axis2 version 1.1. Axis2 uses a standard appserver deployment classloader
architecture to enable service isolation. I was, however, able to confirm
that the classes in question are indeed loaded by the deployment
classloader. This code segment:
Class clazz = null;
ClassLoader cl = this.getClass().getClassLoader();
clazz = Class.forName("com.foo.bar.Account", true, cl);
System.out.println("CL: " + clazz.getClassLoader());
clazz = Class.forName("com.foo.bar.Product", true, cl);
System.out.println("CL: " + clazz.getClassLoader());
clazz = Class.forName("com.foo.bar.Result", true, cl);
System.out.println("CL: " + clazz.getClassLoader());
clazz = Class.forName("com.foo.bar.RequestedBump", true, cl);
System.out.println("CL: " + clazz.getClassLoader());
clazz = Class.forName("org.drools.spi.KnowledgeHelper", true, cl);
System.out.println("CL: " + clazz.getClassLoader());
Yields this at run time:
CL: org.apache.axis2.deployment.DeploymentClassLoader@1903e13
CL: org.apache.axis2.deployment.DeploymentClassLoader@1903e13
CL: org.apache.axis2.deployment.DeploymentClassLoader@1903e13
CL: org.apache.axis2.deployment.DeploymentClassLoader@1903e13
CL: org.apache.axis2.deployment.DeploymentClassLoader@1903e13
Incidentally, putting all of the Drools classes in the system classpath
alleviates the problem...
I don't know enough about what is going on with classloading during the rule
compilation to speculate and/or deal with the Axis2 list intelligently. Can
someone postulate a theory?
Thanks in advance!
17 years, 11 months
Date and Time validation.
by nicolae oana
Hi,
I don't understand how JBossRules is working with Date and Time constraints.
I found that date format is something like "dd-MMM-yyyy" .
Are there other formats that also include a time?
How JBossRules is dealing with these time constraints? What are the functions used in rules to access the values of this constraints?
I found this functions : utilService.dateWithin(someDate), utilService.UNIT_DAY. Are they some built in classes and methods that are used to access data types?
where I could find some documentation to read about them ? Please explain this things to me!
Kind regards, Oana.
---------------------------------
Now that's room service! Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel to find your fit.
17 years, 11 months
Detecting partial matches
by Kevin J. Schmidt
I'm using JBoss Rules 3.0.5 and want to know if there is a way to
detect when a rule partially matches. For example, let's say I have
the following rule:
rule "My Rule"
no-loop true
when
myo1: MyObject(id==12)
myo2: MyObject(id==45)
then
// do something with myo1 and myo2
end
This rule is looking for one MyObject with an id of 12 and another
MyObject with an id of 45. A MyObject with id 12 may come into working
memory before the one with an id of 45. Is there a way, either in Java
code or in the rules file itself, to know when the rule is partially
matched?
Thanks,
--
Kevin J. Schmidt
<kjschmidt(a)gmail.com>
A wise and frugal government, which shall leave men free to regulate
their own pursuits of industry and improvement, and shall not take
from the mouth of labor and bread it has earned - this is the sum of
good government.
--Thomas Jefferson
17 years, 11 months
How do i group the rules and apply
by Raja.Bobbala@sanofi-aventis.com
Hi
Iam a new to Jboss-Rules and would like to know the following.
My scenario is something like this.
I should define 5 rules in rules.drl and need to wire them (execute few of them as a group) depending on some condition.
when
Condition1
then
rule#1, rule#2,rule#5
end
when
Condition2
then
rule#2, rule#3,rule#4
end
when
Condition3
then
rule#1, rule#5
end
when
Condition4
then
All Rules
end.
Regards
Raja Bobbala
17 years, 11 months
Re: [drools-user] using function from another .drl file
by Michael Neale
If you use the one packagebuilder, and you add the source first from the one
with the function, and then the others, yes that should work just fine !
On 1/11/07, Justine Hlista <justine(a)vsasset.com> wrote:
>
> Another newbie question - I'm not sure if what I'm trying to do is legal.
>
> I have two drl files, and one contains a function that I would like to use
> from the other. Is that possible? I am loading the one with the function
> into the rule base first, then the other. But I get an error message from
> the other saying the function cannot be resolved. If I copy the function
> into the other, then it works.
>
> Of course, I can always write a Java helper class for a single definition
> of the function. But I was just wondering if it is possible to maintain a
> single function definition in a drl.
>
> Thanks in advance for any enlightenment!
>
> Justine
>
>
>
17 years, 11 months