[
https://issues.jboss.org/browse/DROOLS-418?page=com.atlassian.jira.plugin...
]
Davide Sottara edited comment on DROOLS-418 at 1/29/14 8:55 PM:
----------------------------------------------------------------
I have just realized that "type == LOW" must be a constraint in a different rule
from the one you posted.. That is the one generated from the DT, but I guess you have
other rules in your KB: the exception stack trace shows an accumulate being involved.
Could you please post the full DRL you are using?
Thanks
Davide
was (Author: dsotty):
I have just realized that "type == LOW" must be a constraint in a different
rule from the one you posted.. That is the one generated from the DT, but do you have
other rules in your KB?
MVEL Unable to resolve method exception on fact update
------------------------------------------------------
Key: DROOLS-418
URL:
https://issues.jboss.org/browse/DROOLS-418
Project: Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 5.5.0.Final
Environment: Linux Mint 15
Jboss 5.1
Reporter: Nedo Nedic
Assignee: Mark Proctor
Attachments: Classifier.xls
The following rule will fail with an exception after update is called on a fact:
rule "Classifier"
no-loop true
salience 65430
when
$sn:Snort(sig_priority == "1", type == null)
then
$sn.setType("LOW");
update($sn);
end
Snort fact type declaration:
declare Snort
@role( event )
@timestamp( event_date )
@expires( 1h )
dport: String
data: String
sport: String
hostname: String
type: String
sig_priority: String
sensor: String
id: java.lang.Long
sig_class_name: String
ip_dst: String
sig_name: String
event_date: java.util.Date
ip_src: String
end
[Error: unable to resolve method: java.util.ArrayList.type() [arglength=0]]
[Near : {... type == "LOW" ....}]
^
[Line: 1, Column: 1]
at
org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.getMethod(ReflectiveAccessorOptimizer.java:1071)
at
org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.getMethod(ReflectiveAccessorOptimizer.java:980)
at
org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.getBeanProperty(ReflectiveAccessorOptimizer.java:670)
at
org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.getBeanPropertyAO(ReflectiveAccessorOptimizer.java:465)
at
org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:370)
at
org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeAccessor(ReflectiveAccessorOptimizer.java:140)
at org.mvel2.ast.ASTNode.optimize(ASTNode.java:159)
at org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:115)
at
org.mvel2.ast.BinaryOperation.getReducedValueAccelerated(BinaryOperation.java:114)
at org.mvel2.MVELRuntime.execute(MVELRuntime.java:86)
at
org.mvel2.compiler.CompiledExpression.getDirectValue(CompiledExpression.java:123)
at org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:119)
at org.mvel2.MVEL.executeExpression(MVEL.java:930)
at
org.drools.rule.constraint.MvelConditionEvaluator.evaluate(MvelConditionEvaluator.java:73)
at
org.drools.rule.constraint.MvelConditionEvaluator.evaluate(MvelConditionEvaluator.java:52)
at org.drools.rule.constraint.MvelConstraint.evaluate(MvelConstraint.java:218)
at org.drools.rule.constraint.MvelConstraint.isAllowed(MvelConstraint.java:175)
at
org.drools.reteoo.AccumulateNode.evaluateResultConstraints(AccumulateNode.java:655)
at
org.drools.reteoo.ReteooWorkingMemory$EvaluateResultConstraints.execute(ReteooWorkingMemory.java:594)
at
org.drools.common.PropagationContextImpl.evaluateActionQueue(PropagationContextImpl.java:364)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:371)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:327)
at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:950)
at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:894)
at
org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:269)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira