摘要:在Drools中使用MVEL方式编译执行规则文件,在高并发的情况下会出现NoClassDefFoundError。

解决方案:添加参数设置-Dmvel2.disable.jit=true 禁用MVEL2 JIT。这样设置可能会使服务器的负载增加,比如CPU和Memory。

相关链接

http://jira.codehaus.org/browse/MVEL-213
https://issues.jboss.org/browse/JBRULES-2253

 

Context info: drools engine version is 5.1.1, jdk version is HotSpot 64-Bit 1.6.0_24, mvel version is mvel2-2.1.Beta3.jar, tomcat version is 5.5.23 and it is just one tomcat instance not distributed.

Our test steps:
1) We use 21 sample test parameters one in one which means not under high concurrent thread number. This doesn't reproduce NoClassDefFoundError.
2) Use JMeter to simulate multiple users and if 50/second or 75/second, This doesn't reproduce NoClassDefFoundError.
3) If 100/second or 150/second, definitely reproduce NoClassDefFoundError.

So this issue is related to high concurrent thread number.

Here are two related links:
http://jira.codehaus.org/browse/MVEL-213
https://issues.jboss.org/browse/JBRULES-2253

Although this bug of MVEL(if it is) was fixed after version 2.0.18, it seems still occur in 2.1.Beta3.

posted on 2012-03-20 10:57  tatecn  阅读(594)  评论(0编辑  收藏  举报