Problems running brms
by Aziz Boxwala
I am having a problem running brms. I cannot view any part of the web page except the mast head.
I earlier had downloaded and tried out brms 4.0 MR3 and it appeared to work fine. I then downloaded a continuous build release and subsequently the 4.0.0 release. In both of these, I encountered the problem.
I am running the brms under JBoss AS 4.2 on Windows Vista. I have used IE 7, Firefox 2.0.0.5 and Safari as the browser.
--Aziz
17 years, 5 months
Updated Maven2 artifacts
by Fernando Meyer
Hi everybody
I just checked in new maven2 artifacts to maven repository, Now it
counts with deployment metadata info and md5 + sha1 checksum.
Regards.
Fernando Meyer http://fmeyer.org
fmcamargo(a)gmail.com
PGP: 0xD804DDFB
17 years, 5 months
(no subject)
by Fernando Meyer
Hi everybody
I just checked in new maven2 artifacts to maven repository, Now it
counts with deployment metadata info and md5 + sha1 checksum.
Regards.
Fernando Meyer http://fmeyer.org
fmcamargo(a)gmail.com
PGP: 0xD804DDFB
17 years, 5 months
Something going on with maven2 repo?
by Eric Miles
I'm trying to attempt to upgrade to 4.0.0 GA again and it looks like the
org.drools:drools:4.0.0 artifact is missing on the server. However,
unlike yesterday, the core and compiler artifacts now have poms and
checksums (which I think was the issue yesterday). Is the release not
fully available on the repo yet?
Thanks,
Eric
17 years, 5 months
NullPointerException in a simple test -- a Drools bug?
by Christian Spurk
Hi all,
I'm trying to migrate my JBoss v3.0.6 rules to the latest v4.0.0
release. I could already resolve some issues but now I'm already stuck
for hours with a NullPointerException that I can't get rid of. I broke
the problem down to a relatively small set of test files that I'd like
to show you here:
/* SimpleTest.java */
package com.sample;
// ... imports removed for brevity
public class SimpleTest {
public static final void main(String[] args) throws Exception {
PackageBuilder builder = new PackageBuilder();
builder.addPackageFromDrl(new InputStreamReader(SimpleTest.class
.getResourceAsStream("/rf1.drl")));
builder.addPackageFromDrl(new InputStreamReader(SimpleTest.class
.getResourceAsStream("/rf2.drl")));
RuleBase rb = RuleBaseFactory.newRuleBase();
rb.addPackage(builder.getPackage());
WorkingMemory wm = rb.newStatefulSession();
wm.insert(new Task()); // <-- crashes here
wm.fireAllRules();
}
}
/* Task.java */
package com.sample;
public class Task {
private String next = null;
public String getNext() {
return next;
}
public void setNext(String next) {
this.next = next;
}
}
// rf1.drl
package com.sample
rule "r0"
when
Task( next == null ); # <-- change to "x"
then
System.out.println("r0");
end
rule "r1"
when
Task( next == "1" );
then
System.out.println("r1");
end
// rf2.drl
package com.sample
rule "r2"
when
Task( next == "2" );
then
System.out.println("r1");
end
As you can see there are two Drools rule files and two Java classes. If
I run the SimpleTest class, I get the following exception:
Exception in thread "main" java.lang.NullPointerException
at
org.drools.reteoo.CompositeObjectSinkAdapter$HashKey.equals(CompositeObjectSinkAdapter.java:608)
at
org.drools.util.AbstractHashTable$EqualityEquals.equal(AbstractHashTable.java:345)
at org.drools.util.ObjectHashMap.get(ObjectHashMap.java:86)
at
org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:295)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:168)
at org.drools.reteoo.Rete.assertObject(Rete.java:168)
at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:190)
at
org.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:70)
at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:848)
at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:822)
at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:623)
at com.sample.SimpleTest.main(SimpleTest.java:22)
I've marked the position in the source code at which the run crashes.
Does anybody have an idea what's wrong here?
Some more strange things relating to this problem:
* If I change the 'null' in rf1.drl to '""' (empty string), the
problem remains.
* If I change the 'null' in rf1.drl to '"x"' (or some other non-empty
string), then the exception is gone.
* If I remove any of the two rule files, the exception is gone, too.
Any ideas? Should I file a bug?
Thanks in advance!
Cheers,
Christian
17 years, 5 months
Accum question
by Mike D
Newbie question again...
I'm trying to get a count of V lines if I have an X. If more than 1 V line,
I pass... Obviously I can't have $totV on LHS, but you get my drift. What
is the correct syntax for this one? I've been digging in the docs on accum,
but can't find anything that fits what I'm trying to do.
Thanks,
Mike
rule "00910 Pass XV sets"
when
$status : ValidationPassFailStatus()
exists ValidationControl(validationNo == 910)
$totV : number()
from accumulate(CiLines($ciNo : $ciNo, $ciLineNo : ciLineNo, spiSecondary
== "V"), sum($totV))
CiLines(ciNo == $ciNo, ciLineNo == $ciLineNo, spiSecondary
== "X", $totV > 1)
then
$status.pass(910);
end
--
View this message in context: http://www.nabble.com/Accum-question-tf4157809.html#a11829193
Sent from the drools - user mailing list archive at Nabble.com.
17 years, 5 months
RE: [rules-users] Using rules with database scenario
by Uday Kamath
We had similar use case. What we do is we model the Schema elements,
generate Java Beans (pojo), and write rules using these Pojo. Now we
have written a Service on top which takes Hibernate QL and gets the
database records as the same Pojos that Rules are defined on and fire
the Rules. Thus the service is generic and can be changed to take any
Query. The Rules can me modified and changed anytime and redeployed but
business objects in form of Pojos remain the same. Hope this helps
-Uday
________________________________
From: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Joe Chuby
Sent: Friday, March 09, 2007 3:53 AM
To: rules-users(a)lists.jboss.org
Subject: [rules-users] Using rules with database scenario
Hi all,
First time trying to learn JBoss Rules here. We have a pretty large
database (DBMS), we want to build some rules and retrieve data based on
the rules.
Could someone give a hint or an example of this usage scenario? I mean,
how can I use rules for database query, without writing my rules in SQL
directly? We are currently writing everything in HQL (Hibernate), but
the rules change every 3 months on average, so that's not a way to
maintain the system. Therefore, we want to extract that portion of the
business logic out of the code. The data structure does not change, but
the rules keep on changing.
I'm reading the user's guide, running thru the examples, writing some of
my own, but still no clue how to make it work with database.
If someone could give a sample, that would be greatly appreciated.
Thanks a lot.
________________________________
Bored stiff? <http://us.rd.yahoo.com/evt=49935/*http:/games.yahoo.com>
Loosen up...
Download and play hundreds of games for free
<http://us.rd.yahoo.com/evt=49935/*http:/games.yahoo.com> on Yahoo!
Games.
17 years, 5 months
[Newbie] Can't execute BRMS Discount insurance brokers tutorial
by Massimo Frossi
I' ve gone a little bit forward in the meantime, I've installed
drools-4.0.0-examples.zip, drools-4.0.0-eclipse.zip,
drools-4.0.0-brms.zip and followed the whole tutorial without errors,
but when I execute the main class i get the following error:
RuleAgent(insuranceconfig) INFO (Thu Jul 26 18:01:28 CEST 2007):
Configuring with newInstance=true, secondsToRefresh=30
RuleAgent(insuranceconfig) INFO (Thu Jul 26 18:01:28 CEST 2007):
Configuring package provider : URLScanner monitoring URLs:
http://localhost:8080/drools-jbrms/org.drools.brms.JBRMS/package/org.acme...
RuleAgent(insuranceconfig) EXCEPTION (Thu Jul 26 18:01:29 CEST 2007):
org.mvel.CompiledExpression; local class incompatible: stream classdesc
serialVersionUID = -8459552198577984707, local class serialVersionUID =
-1994048675652702021. Stack trace should follow.
java.io.InvalidClassException: org.mvel.CompiledExpression; local class
incompatible: stream classdesc serialVersionUID = -8459552198577984707,
local class serialVersionUID = -1994048675652702021
I see that there is a mismatch between different mvel libraries, but I
couldn't come to a final solution...could you please tell me what am I
doing wrong?
Thank you,
Max
17 years, 5 months