Thanks Wolfgang! Very helpful!
发件人: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] 代表 Wolfgang Laun
发送时间: 2012年3月11日 2:58
收件人: Rules Users List
主题: Re: [rules-users] 答复: Adhoc NullPointer exception in rule execution
Since you ask me... It may not be "wisdom", though...
I do not use 'dialect "mvel"' in the rules I write. Here are some facts
on
which this decision is based.
* My company develops safety-relevant SW according to the standards
set forth by a body called CENELEC
<
http://en.wikipedia.org/wiki/European_Committee_for_Electrotechnical_Standa
rdization> . The (for us) essential standard refutes the use of any language
that hasn't a formal definition. I've never found such a definition for
MVEL.
* A considerable number of Drools bugs are, in fact, MVEL bugs.
* Bug fixing of MVEL by its author is tardy (as I've been told by
members of the Drools team), and therefore:
* The Drools project had to adopt the strategy of issuing their own
release of MVEL, to be bundled with Drools releases.
There's some good reasons why MVEL has been introduced into Drools, and why
it is used when and where it is used. But I wouldn't recommend it's use in
RHS of rules just to save me the trouble of writing the more verbose Java
equivalent.
Also, I'd like to point out that MVEL bug fixing has picked up as soon as
Drools team members were available to do so.
Cheers
Wolfgang
2012/3/10 Zhuo Li <milanello1998(a)gmail.com>
Yep, Wolfgang,
It’s a code issue � I just identified it… thanks. I have another thread
talking about NoClassDefFound exception. Would appreciate if you can share
your wisdom there.
Best
Abe
发件人: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] 代表 Wolfgang Laun
发送时间: 2012年3月11日 1:06
收件人: Rules Users List
主题: Re: [rules-users] Adhoc NullPointer exception in rule execution
The location of the NPE is
at com.xxx.xxx.xxx.xxx.xxx.xxx.xxx(xxx.java:634)
and that's your code, invoked from the right hand side of rule Match.
-W
2012/3/10 Zhuo Li <milanello1998(a)gmail.com>
Hi, folks,
I’m using Drools 5.1, MVEL dialect, JDK 1.6 to build a OLTP system running
on tomcat 6.0.28. the runtime environment is on a cloud virtual and node
profile is relatively small. We’ve noticed below run time exceptions from
prod since it’s online from day one which is impacting transaction
processing. However it is happening adhoc-ly. Here I have 1 question:
1. The yellow marked lines are actually java file compiled from DRL
file. Why there is null pointer exception thrown from
org.drools.common.DefaultAgenda.fireActivation?
ERROR>2012-02-25 11:42:25,071
com.xxx.xxx.xxx.xxx[DefaultQuartzScheduler_Worker-3]: Rules run time error:
org.drools.runtime.rule.ConsequenceException: rule: Match
at
org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleExcept
ion(DefaultConsequenceExceptionHandler.java:39)
at
org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:916)
at
org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:845)
at
org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1056)
at
org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.j
ava:733)
at
org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.j
ava:699)
at
org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeS
essionImpl.java:218)
at com. xxx.xxx.xxx.xxx.xxx.xxx.xxx (SessionManager.java:94)
at com. xxx.xxx.xxx.xxx.xxx.xxx.yyy(SessionManagerJob.java:17)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525
)
Caused by: java.lang.NullPointerException
at com.xxx.xxx.xxx.xxx.xxx.xxx.xxx(xxx.java:634)
at com.xxx.xxx.xxx.xxx.xxx.yyy.yyy(yyy.java:227)
at com.xxx.xxx.xxx.xxx.xxx.yyy.zzz(zzz.java:115)
at com.xxx.xxx.xxx.xxx.xxx.yyy.ttt(ttt.java:83)
at com.xxx.xxx.xxx.xxx.xxx.yyy.uuu(uuu.java:75)
at com. com.xxx.xxx.xxx.xxx.xxx.yyy.vvv(vvv.java:9)
at com. com.xxx.xxx.xxx.xxx.xxx.yyy.www(www.java:28)
at
org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:906)
... 9 more
Best regards
Abe
_______________________________________________
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