Could not load property
by Rahul Upadhyay
Hi
I am made an application in struts,write some rules in drl file. deployed
it with BRMS. now I am trying it with rule agent with rule.properties file
or using drl file directly by setting path in classpath. but always find
following error
11:56:31,696 ERROR [STDERR] java.lang.NullPointerException
11:56:31,696 ERROR [STDERR] at java.io.Reader.<init>(Reader.java:61)
11:56:31,696 ERROR [STDERR] at java.io.InputStreamReader.<init>(
InputStreamReader.java:55)
11:56:31,696 ERROR [STDERR] at
com.cstregistration.DroolsTest.readRule(DroolsTest.java:42)
11:56:31,712 ERROR [STDERR] at
com.cstregistration.DroolsTest.callrule(DroolsTest.java:21)
11:56:31,712 ERROR [STDERR] at
com.cstregistration.A1RegistrationAction.execute(A1RegistrationAction.java:61)
11:56:31,712 ERROR [STDERR] at
org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.jav
a:58)
Please tell me where is problem, Why properties file or drl file is not
found ?
Thanks in advance
--
View this message in context: http://www.nabble.com/Could-not-load-property-tp14384497p14384497.html
Sent from the drools - user mailing list archive at Nabble.com.
17 years
BaseDescr and addOrMerge method
by Raffaele Viola
Hi all,
I'm searching for a description about the way to use the addOrMerge method
in the BaseDescr interface,
but in the Drools 4.0.3 API there are nothing? Can someone help me?
Thanks in advance
Raffo
17 years
from l18n syntax question
by Waruzjan Shahbazian
Hi all,
I have the following problem:
There is an Product classe which contains localized title with the getter:
public Localized<String> getTitle() {
return _title;
}
Localizes is a classe with private final Map<Locale, T> _bindings; and
has the public getter: public T get(Locale locale) {}
Now I want to check in the LHS of my rule if the title contains some
substring. I can do that with matches(regular expression), but how can I
best iterate in the localizede strings of the title?
I am now doing it with the following eval() way, but there must be a
better solution:
There are 2 languages in Localizes, so I can check that with the public
int size. There is also a methode get(Locale) to get the String of the
given local, but how can I use that here?
$prd : Product()
$title : Localized(size == 2) from $prd.getTitle()
eval( matchesLocalTestString($title, "(?i).*SUBSTRING.*") )
function boolean matchesLocalTestString(Localized locString, String
matchString) {
String tmpStr = (String) locString.get(LocaleUtils.DUTCH);
return tmpStr.matches(matchString) ;
}
The code above works, but I can't get the result of the eval and I don't
think this is the fastest way. So can anyone please help me with this?
Thanks,
Waruzjan Shahbazian
17 years
RE: Reverse Engineering
by Sikkandar Nawabjan
Hi,
I have one doubt regarding reverse engineering!!!!. I have rulebase(set of drls and corresponding dsls). From the existing file sources i want to use it as input to rule flow and brms. can i do that?
If so can you briefly tell me how to do that
Sikkandar Basha
Tech Lead WPEPDS
UST Global<http://intranet.ustri.com/email/UST-logo.jpg> B5N 144, Bhavani
Technopark, Trivandrum, India
sikkandar.nawabjan(a)ust-global.com <mailto:sikkandar.nawabjan@ust-global.com>
T: +91-471-2335777 Extn: 6802036
M: +91-9946555330
F: +91-471-2527276
________________________________
From: rules-users-bounces(a)lists.jboss.org on behalf of rules-users-request(a)lists.jboss.org
Sent: Thu 10/4/2007 1:32 AM
To: rules-users(a)lists.jboss.org
Subject: rules-users Digest, Vol 11, Issue 26
Send rules-users mailing list submissions to
rules-users(a)lists.jboss.org
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.jboss.org/mailman/listinfo/rules-users
or, via email, send a message with subject or body 'help' to
rules-users-request(a)lists.jboss.org
You can reach the person managing the list at
rules-users-owner(a)lists.jboss.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of rules-users digest..."
Today's Topics:
1. Rule Compilation error (Michael Epstein)
2. MVEL VariableResolverFactory problem on eclipse (Felipe Piccolini)
3. suggestion for drl grammar: single-element constraints
(Godmar Back)
4. RE: rules precompilation (Manukyan, Sergey)
5. RE: rules precompilation (Jin, Ming)
6. RE: rules precompilation (Manukyan, Sergey)
7. Re: MVEL VariableResolverFactory problem on eclipse (ekke)
----------------------------------------------------------------------
Message: 1
Date: Wed, 3 Oct 2007 11:32:57 -0700
From: "Michael Epstein" <mepstein(a)symark.com>
Subject: [rules-users] Rule Compilation error
To: <rules-users(a)lists.jboss.org>
Message-ID: <GIEDKOGGENKAICNCOMICGEAFCAAA.mepstein(a)symark.com>
Content-Type: text/plain; charset="iso-8859-1"
Hi,
I have a JBRMS question. I have DSL that I am using, when I build a rule in
the guided editor that uses the DSL it works fine. When I use the business
rule text edit, the same [when] fails validation.
Here is the error:
Rule Compilation error Expression "smcUnit" is not an rvalue Unknown
variable or type "smcUnit" Expression "smcUnit" is not an lvalue Unknown
variable or type "smcUnit" A method named "setSmcUnitId" is not declared in
any enclosing class nor any supertype, nor through a static import
Expression "smcUnit" is not an rvalue Expression "smcUnit" is not an rvalue
Expression "smcUnit" is not an rvalue Unknown variable or type "smcUnit"
Unknown variable or type "smcUnit" Expression "smcUnit" is not an rvalue
Expression "smcUnit" is not an rvalue Expression "smcUnit" is not an rvalue
Unknown variable or type "smcUnit" Exception:14 error(s) while compiling
unit "com/symark/smc/Rule_test2_0.java"
Here is the DSL:
[when]There is a Log=LogStartStop()
[when]- runUserId with a command run by user: '{id}'=runUserId == "{id}"
[when]- submitUserId with a command submitted by user: '{id}'=submitUserId
== "{id}"
[when]- runHostId with a command run on host: '{id}'=runHostId == "{id}"
[when]- submitHostId with a command submitted from host: '{id}'=submitHostId
== "{id}"
[then]Assign to unit with id: '{id}' = smcUnit = new SmcUnit() ;
smcUnit.setSmcUnitId("{id}") ; insert(smcUnit ) ;
And finally here is the rule:
when
There is a Log
- runUserId with a command run by user: 'smc_app_elton'
then
Assign to unit with id: '1'
Any help would be greatly appreciated.
Thanks,
Mike
------------------------------
Message: 2
Date: Wed, 3 Oct 2007 14:33:29 -0400
From: Felipe Piccolini <felipe.piccolini(a)bluesoft.cl>
Subject: [rules-users] MVEL VariableResolverFactory problem on eclipse
To: Rules Users List <rules-users(a)lists.jboss.org>
Message-ID: <813CC3C8-5C6B-42C0-91E7-786A292B9A06(a)bluesoft.cl>
Content-Type: text/plain; charset="us-ascii"
updated to 4.0.1 and creating a new drools project. Any .drl file
(and also rule flows) shows errors with this info on problems tab
on eclipse:
org/mvel/integration/VariableResolverFactory
no more info, actualy I can run the rules (from the Sample.drl) but
it shows the problem.
I tried changing libraries and jdt dependencies, but not succes...
what can it be?...anyone has this problem too?
Thanks.
Felipe Piccolini M.
felipe.piccolini(a)bluesoft.cl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20071003/69cbe07...
------------------------------
Message: 3
Date: Wed, 3 Oct 2007 14:38:01 -0400
From: "Godmar Back" <godmar(a)gmail.com>
Subject: [rules-users] suggestion for drl grammar: single-element
constraints
To: "Rules Users List" <rules-users(a)lists.jboss.org>
Message-ID:
<719dced30710031138y3996a848p3ada4c4bc4bca68b(a)mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
If a fact contains a single field, it would be nice to be able to
express a constraint on the value of that field without having to know
its name, e.g.:
Cheese ("stilton")
which would be equivalent to
Cheese (type == "stilton")
if Cheese contained only one field, and which would be a compile-time
error otherwise.
A similar convenience syntax is used, for instance, for Java 5
annotations. Instead of having to say @Retention(value =
RetentionPolicy.RUNTIME) it can be abbreviated
@Retention(RetentionPolicy.RUNTIME) since this annotation only has a
single field.
- Godmar
------------------------------
Message: 4
Date: Wed, 3 Oct 2007 15:20:39 -0400
From: "Manukyan, Sergey" <SManukyan(a)lear.com>
Subject: RE: [rules-users] rules precompilation
To: "Rules Users List" <rules-users(a)lists.jboss.org>
Message-ID:
<4E03EDD62CB1CB4599E6BD71DBEDFD2002AD17C8(a)usmitry-exm1.corp.lear.com>
Content-Type: text/plain; charset=US-ASCII
Ming, Ekke,
After deserialising the Package back - getting exception when inserting
facts:
Exception thrown : java.lang.NoClassDefFoundError: XXXShadowProxy
XXX - is my class name
Any ideas?
-Sergey
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Jin, Ming
Sent: Wednesday, October 03, 2007 1:50 PM
To: Rules Users List
Subject: RE: [rules-users] rules precompilation
Sergey,
I am using precompiled rules. Serializing instances of
org.drools.rule.Package works for me.
Thanks,
-Ming
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Manukyan,
Sergey
Sent: Wednesday, October 03, 2007 12:29 PM
To: Rules Users List
Subject: [rules-users] rules precompilation
Folks,
Where can I find information on how to pre-compile rules in 4.0.1?
Thanks,
-Sergey
**********************
** LEGAL DISCLAIMER **
**********************
This E-mail message and any attachments may contain legally privileged,
confidential or proprietary information. If you are not the intended
recipient(s), or the employee or agent responsible for delivery of this
message to the intended recipient(s), you are hereby notified that any
dissemination, distribution or copying of this E-mail message is
strictly prohibited. If you have received this message in error, please
immediately notify the sender and delete this E-mail message from your
computer.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
------------------------------
Message: 5
Date: Wed, 3 Oct 2007 14:39:32 -0500
From: "Jin, Ming" <Ming.Jin(a)travelocity.com>
Subject: RE: [rules-users] rules precompilation
To: "Rules Users List" <rules-users(a)lists.jboss.org>
Message-ID:
<E84FE257D840B34FA428A3C281A111440916A775(a)sgtulmsp03.Global.ad.sabre.com>
Content-Type: text/plain; charset="us-ascii"
Did you save the Package right after the creation from PackageBuilder,
or after some other processes?
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Manukyan,
Sergey
Sent: Wednesday, October 03, 2007 2:21 PM
To: Rules Users List
Subject: RE: [rules-users] rules precompilation
Ming, Ekke,
After deserialising the Package back - getting exception when inserting
facts:
Exception thrown : java.lang.NoClassDefFoundError: XXXShadowProxy
XXX - is my class name
Any ideas?
-Sergey
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Jin, Ming
Sent: Wednesday, October 03, 2007 1:50 PM
To: Rules Users List
Subject: RE: [rules-users] rules precompilation
Sergey,
I am using precompiled rules. Serializing instances of
org.drools.rule.Package works for me.
Thanks,
-Ming
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Manukyan,
Sergey
Sent: Wednesday, October 03, 2007 12:29 PM
To: Rules Users List
Subject: [rules-users] rules precompilation
Folks,
Where can I find information on how to pre-compile rules in 4.0.1?
Thanks,
-Sergey
**********************
** LEGAL DISCLAIMER **
**********************
This E-mail message and any attachments may contain legally privileged,
confidential or proprietary information. If you are not the intended
recipient(s), or the employee or agent responsible for delivery of this
message to the intended recipient(s), you are hereby notified that any
dissemination, distribution or copying of this E-mail message is
strictly prohibited. If you have received this message in error, please
immediately notify the sender and delete this E-mail message from your
computer.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
------------------------------
Message: 6
Date: Wed, 3 Oct 2007 15:55:02 -0400
From: "Manukyan, Sergey" <SManukyan(a)lear.com>
Subject: RE: [rules-users] rules precompilation
To: "Rules Users List" <rules-users(a)lists.jboss.org>
Message-ID:
<4E03EDD62CB1CB4599E6BD71DBEDFD2002AD17E5(a)usmitry-exm1.corp.lear.com>
Content-Type: text/plain; charset=US-ASCII
Did it immediately...
If you don't mind could you post code that works?
Thanks.
-Sergey
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Jin, Ming
Sent: Wednesday, October 03, 2007 3:40 PM
To: Rules Users List
Subject: RE: [rules-users] rules precompilation
Did you save the Package right after the creation from PackageBuilder,
or after some other processes?
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Manukyan,
Sergey
Sent: Wednesday, October 03, 2007 2:21 PM
To: Rules Users List
Subject: RE: [rules-users] rules precompilation
Ming, Ekke,
After deserialising the Package back - getting exception when inserting
facts:
Exception thrown : java.lang.NoClassDefFoundError: XXXShadowProxy
XXX - is my class name
Any ideas?
-Sergey
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Jin, Ming
Sent: Wednesday, October 03, 2007 1:50 PM
To: Rules Users List
Subject: RE: [rules-users] rules precompilation
Sergey,
I am using precompiled rules. Serializing instances of
org.drools.rule.Package works for me.
Thanks,
-Ming
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Manukyan,
Sergey
Sent: Wednesday, October 03, 2007 12:29 PM
To: Rules Users List
Subject: [rules-users] rules precompilation
Folks,
Where can I find information on how to pre-compile rules in 4.0.1?
Thanks,
-Sergey
**********************
** LEGAL DISCLAIMER **
**********************
This E-mail message and any attachments may contain legally privileged,
confidential or proprietary information. If you are not the intended
recipient(s), or the employee or agent responsible for delivery of this
message to the intended recipient(s), you are hereby notified that any
dissemination, distribution or copying of this E-mail message is
strictly prohibited. If you have received this message in error, please
immediately notify the sender and delete this E-mail message from your
computer.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
------------------------------
Message: 7
Date: Wed, 3 Oct 2007 13:02:12 -0700 (PDT)
From: ekke <ekkehard(a)gentz-software.de>
Subject: Re: [rules-users] MVEL VariableResolverFactory problem on
eclipse
To: rules-users(a)lists.jboss.org
Message-ID: <13026772.post(a)talk.nabble.com>
Content-Type: text/plain; charset=us-ascii
felipe,
please DON'T send your messages to the list AND to private mail-accounts !
.........have you started eclipse with -clean ?
ekke
Felipe Piccolini wrote:
>
> updated to 4.0.1 and creating a new drools project. Any .drl file
> (and also rule flows) shows errors with this info on problems tab
> on eclipse:
> org/mvel/integration/VariableResolverFactory
>
> no more info, actualy I can run the rules (from the Sample.drl) but
> it shows the problem.
>
> I tried changing libraries and jdt dependencies, but not succes...
> what can it be?...anyone has this problem too?
>
> Thanks.
>
> Felipe Piccolini M.
> felipe.piccolini(a)bluesoft.cl
>
>
>
>
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
--
View this message in context: http://www.nabble.com/MVEL-VariableResolverFactory-problem-on-eclipse-tf4...
Sent from the drools - user mailing list archive at Nabble.com.
------------------------------
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
End of rules-users Digest, Vol 11, Issue 26
*******************************************
17 years
Going Crazy With the Insurance Maven Build (OH GOSH!)
by mmquelo massi
Hi Guys.
I am "playing" with the drools-insurance example and I have to admit that
something
is out of my understanding.
I try to do a little digest...
1) I imported the "Insurance example" into eclipse 3.3
2) I converted it into a drools Project
3) I converted it into a MAVEN build project (The little red M came out...)
4) I ran the "pom.xml" as a Maven application.
What I get is a .war in the target dir with the java classes, the rules and
other Stuff (web stuff I guess).
Well....
What I really do not Understand is : "Why the hell u included the rules into
the workspace?"
....
I mean... by the time the RuleAgent will pick the rules up from the BRMS, we
really do not need
any reference to the Workspace rules! Furthermore I did a 'search' within
the eclipse workspace looking
for some references to the rules and I did not find any!
So.... Why did u put the rules as well??
As far as concerned the .war file, if u bind the .war classes to the Rule
Agent,
Why the hell u put the Rules in the .wat file as Well??
Am I Wrong? What Am I missing?
I spent a couple of days to find a reason but I did not find any so far...
Please, Somebody anwers me... I went crazy with this...
Sorry to be "upset" but I am just upset with myself 'cause likely I spent
a lot of time on something that is obvious to the most of you.
Hopefully u can help me.
Massi
17 years
Contains substring in the LHS with regular expression capturing groups?
by Waruzjan Shahbazian
Hi,
I need to check in the LHS of my rule if a given String contains an
given substring. What is the best way to do that? I can use regular
expression with matches, but is that the best (fastest) solution?
(STRING matches "(?i).*SUBSTRING.*"). And can I use regulare expressions
capturing groups and than use the results of the groups in the RHS? If
not, what is the best methode to do that?
Thanks,
Waruzjan
17 years
Drools and eclipse RCP
by Michael Sizaki
Hi,
is it possible to use the drools editor etc in an eclipse RCP
application? At the moment, org.drools.eclipse plugin
depends on debug and jdt and other eclipse IDE related
plugins.....
I would want a simple way for users to enter rules into
my RCP application.
Michael
17 years
Using the audit viewer in own panels
by Fermion
Hi!
I really like the audit viewer that you get if you use the drools
perspective in eclipse. It would be great if one could use the audit viewer
and the possibility to open old log files within a java user application.
Is there a possibility to integrate / use the audit viewer in my own java UI
application? If so, how would I do that (as I don't find any fitting classes
in the API-doc)?
Thanks!
--
View this message in context: http://www.nabble.com/Using-the-audit-viewer-in-own-panels-tp14250616p142...
Sent from the drools - user mailing list archive at Nabble.com.
17 years
Serialization issue
by Eric Miles
All,
I'm using Xstream for serialization in my project. I am having an issue
after deserializing a package in that application's classloader can't
find a generated class created by Drools for a function. When I look at
the serialized XML, I see an entry for the class:
<entry>
<string>com/kronos/webta/service/smarttime/rules/CalculateTotal.class</string>
...
</entry>
When I step through the Package being deserialized, I see the proper
function name if the functions list (calculateTotal) as well as I see
com.kronos.webta.service.smarttime.rules.CalculateTotal.calculateTotal
listed as a static import.
However, when I go to actually run this rule I get the following:
java.lang.NoClassDefFoundError:
com/kronos/webta/service/smarttime/rules/CalculateTotal
ASMAccessorImpl_52652861197561487220.getValue(Unknown Source)
org.mvel.ASTNode.getReducedValueAccelerated(ASTNode.java:173)
org.mvel.MVELRuntime.execute(MVELRuntime.java:88)
org.mvel.CompiledExpression.getValue(CompiledExpression.java:108)
org.mvel.MVEL.executeExpression(MVEL.java:247)
org.drools.base.dataproviders.MVELDataProvider.getResults(MVELDataProvider.java:45)
org.drools.reteoo.FromNode.assertTuple(FromNode.java:64)
org.drools.reteoo.SingleTupleSinkAdapter.propagateAssertTuple(SingleTupleSinkAdapter.java:20)
org.drools.reteoo.CollectNode.modifyTuple(CollectNode.java:315)
org.drools.reteoo.CollectNode.assertObject(CollectNode.java:214)
org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:22)
org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:140)
org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:317)
org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:153)
org.drools.reteoo.Rete.assertObject(Rete.java:177)
org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:192)
org.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:71)
org.drools.common.AbstractWorkingMemory.update(AbstractWorkingMemory.java:1268)
org.drools.base.DefaultKnowledgeHelper.update(DefaultKnowledgeHelper.java:96)
Anyone have any idea about how to go about finding out what the issue is?
Thanks in advance.
Eric
17 years
LHS rule problem with function
by Eric Miles
I'm having a problem with a function I'm trying to call, can someone
lend some advice? I've put together a sample rule (I know the rule
doesn't make much sense, but humor me).
When trying to compile, I get the following error:
* (1,54) unable to resolve method using strict-mode:
java.lang.Object.calculateTotal(...)
Here is the rule and accompanying function
package test;
import java.util.ArrayList;
rule "Find Marker"
dialect "java"
when
$list: ArrayList()
Integer() from calculateTotal($list, new Integer(6), new Integer(10))
then
logIt();
end
function void logIt() {
System.out.println("FOUND!");
}
function int calculateTotal(ArrayList numbers, Integer val1, Integer
val2) {
int total = 0;
Iterator it = numbers.iterator();
while(it.hasNext()) {
Integer i = (Integer)it.next();
total += i.intValue();
}
return total;
}
Thanks in advance,
Eric
17 years