java.lang.LinkageError
by David Minor
Hi,
We're in the process of moving our web apps from Java 5 to Java 7 and
Drools 3 to Drools 5.4.0. Our rule base is compiled and serialized to
the db by one app, and read from the db and fired by another.
Everything went fine during testing, but when we tried to switch to
production we got this when firing the rule base:
Caused by: java.lang.LinkageError:
ShoppingCart/Rule_CSMEGBUL_b996907c25e3495a94b6b041c1c08c50
at ShoppingCart.Rule_CSMEGBUL_b996907c25e3495a94b6b041c1c08c50Eval0InvokerGenerated.evaluate(Unknown
Source)
at ShoppingCart.Rule_CSMEGBUL_b996907c25e3495a94b6b041c1c08c50Eval0Invoker.evaluate(Unknown
Source)
at org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:114)
at org.drools.reteoo.EvalConditionNode.assertLeftTuple(EvalConditionNode.java:178)
[snip]
Does anyone have any ideas as to what might cause this?
Here is the rule in question if that helps:
rule "CSMEGBUL"
salience -1
agenda-group "SubtotalDependent"
when
delegate: PromotionRuleDelegate ( )
cart: ShoppingCart ( )
eval (
delegate.checkDateRange("1181718000000","1497337200000") )
eval ( delegate.checkEnabled("false") )
eval ( delegate.cartHasPromoCode(cart, "CSMEGBUL") )
eval ( delegate.checkUsage(1,100027) )
then
delegate.applyOrderDiscountAmount(cart, 100027, "10.0");
delegate.promoCodeApplied(cart, "CSMEGBUL");
end
--
_____________
David Minor
12 years, 4 months
Drools Guvnor 5.2 Issue on Websphere AS 7
by Ravikiran
Hi Drools gurus,
I am back again. As most of you know that i had many 'weld' related issues
for deploying Drools Guvnor 5.4 in Webspere 7. After all my trails, i have
decided to go for Guvnor 5.2 (which doesn't have weld+seam dependancies)
deployment on Websphere As7.
This time, I was able to deploy Guvnor 5.2.0 Final on Websphere AS7
successfully without any errors. I have changed the repository to my own
file path. When i launch the guvnor for the first it had asked me to load
the sample packages, i have chosen YES. It was succeffully loaded all sample
packages into my given file path. That's it, after the loading, my browser
window was completely blank except "Drools" logo on top left and
guest[signout] on top right.
Any Idea what was wrong with my setup. What should i do to get the guvnor
web...Please help.
http://localhost:9080/drools-guvnor/org.drools.guvnor.Guvnor/Guvnor.html
I saw view source,
----
----
<link rel="stylesheet" href="css/Guvnor.css">
<link rel="stylesheet" href="css/Guvnor_DecoratedPopupPanel.css">
<link rel="stylesheet" href="css/ruleflow.css">
</head>
<body>
<iframe id="__gwt_historyFrame" style="width: 0; height: 0; border:
0"></iframe>
<div id="loading">
<div class="loading-indicator">
images/loading-icon.gif
Please wait<br />
Loading application...
</div>
</div>
</body>
</html>
-----------------------------------------------------------------------------------------------
Is it something to do with 'org.drools.guvnor.Guvnor.nocache.js'?
thanks a lot in advance.
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-Guvnor-5-2-Issue-on-Websphere-AS...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 4 months
Question about the Nature of Ruleflows
by BenjaminWolfe
I'm trying to wrap my mind around the nature of ruleflows -- and I think this
question sums up a bit of my confusion.
I have a stateful knowledge session. The stateful knowledge session has a
ruleflow associated with it. That ruleflow diverges into two branches --
branch A and branch B -- based on a rule constraint. It's an XOR, and the
mvel rule constraints are something like this:
to branch A
$u : User( $i : userId )
exists ( Dog( owner == $i, hasDogTag == false) )
to branch B
$u : User( $i : userId )
not ( Dog( owner == $i, hasDogTag == false) )
Then the two branches converge again. I insert two facts: user 1, whose
dogs all have dog tags, and user 2 whose third dog is missing a tag. Then,
after I insert both facts, I fire all rules.
Should the flow be like this?
user 1: start --> diverge --> branch A (tell him to buy dog tags) -->
converge --> end
user 2: start --> diverge --> branch B (leave him alone) --> converge -->
end
Or does a ruleflow look at the whole session rather than each fact -- in
which case either both users would pass through branch A, or both would pass
through branch B?
If I want the first case to happen, is there something I'm missing in the
implementation? And are there any more details I can add to make my post
more specific? Thank you for your help.
--
View this message in context: http://drools.46999.n3.nabble.com/Question-about-the-Nature-of-Ruleflows-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 4 months
Drools Upgrade to 5.4
by dxande6
I'm upgrading to Drools 5.4 from Drools 5.0.1. When I try to compile the
.drl files into a .pkg I'm getting a couple of strange errors. Hoping
someone can help.
Here is the .drl
rule "Rule 1 - Testing"
no-loop true
when
$orderInfo : OrderingInfo (orderedProducts != null)
then
Customer customer = $orderInfo.getCustomer();
ArrayList<ProductAttribute> productAttributes =
$orderInfo.getAttributes();
String localCode = getCode();
end
function String getCode (Customer customer) {
return customer.getCode();
}
I get an error when I try to compile saying the following:
Unable to resolve type ArrayList<ProductAttribute>
If I remove the line and just use ArrayList and leave off the
"<ProductAttribute>" component, it works.
Any help is appreciated.
It also cannot access the getCode() function.
I'm not sure why that is the case.
Finally, I can get all of these things to work when I run the rules using
the .DRL files. Typically we compile them into packages prior to
deployment.
Thank you again in advance for any/all of your help.
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-Upgrade-to-5-4-tp4019321.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 4 months
modify and update is not working in the rule file
by Rana
Please let me know what is the problem in this. It does not update the values
when I get the values, it gives me null in my unit test method.
rule "Drug Strength" extends "Provider State"
no-loop true
dialect "mvel"
agenda-group "AndroGel"
when
Drug( $drug.getStrength == "20.25 mg/1.25 gram (1.62 %)" )
$p : Program()
then
#drools.getWorkingMemory().setGlobal("boolDrugStrength", true )
modify( $p) {
setProgramId( "610.contentId(a)samplemd.com" ),
setProgramName( "AndroGel 1.62% Savings Card" )
};
update( $p )
#retract( $p )
#retract( $drug )
log.info("Prgram ID and Program Name is set for program Coupon for
Androgel");
#drools.halt();
end
Thanks.
--
View this message in context: http://drools.46999.n3.nabble.com/modify-and-update-is-not-working-in-the...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 4 months
Drools 5.4 and Java Generics
by dxande6
I’m receiving errors when compiling my .drl files as a result of using Java
generics.
Example:
rule "Rule 1 - Testing"
no-loop true
when
$orderInfo : OrderingInfo (orderedProducts != null)
then
Customer customer = $orderInfo.getCustomer();
ArrayList<ProductAttribute> productAttributes =
$orderInfo.getAttributes();
String localCode = getCode(customer);
end
It complains that ArrayList<ProductAttribute> cannot be resolved … actual
error is below:
RuleBaseTask failed: Unable to resolve type ArrayList<ProductAttribute>:
Unable to find class 'ArrayList<ProductAttribute>' : [Rule name='Rule 1
- Testing']
Is there a resolution to this problem?
Thank you in advance.
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-5-4-and-Java-Generics-tp4019327....
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 4 months