Details
-
Bug
-
Resolution: Done
-
Major
-
5.4.0.Final, 5.5.0.Beta1
-
None
Description
When an event is inserted and fired multiple times where the matches operator is used using a variable (instead of a constant string), a separate thread can be spawn and cause a null pointer exception.
Exception in thread "Thread-0" java.lang.NullPointerException at org.drools.rule.constraint.ConditionAnalyzer.analyzeSingleCondition(ConditionAnalyzer.java:113) at org.drools.rule.constraint.ConditionAnalyzer.analyzeCondition(ConditionAnalyzer.java:99) at org.drools.rule.constraint.ConditionAnalyzer.analyzeCondition(ConditionAnalyzer.java:70) at org.drools.rule.constraint.MvelConditionEvaluator.getAnalyzedCondition(MvelConditionEvaluator.java:83) at org.drools.rule.constraint.MvelConstraint.executeJitting(MvelConstraint.java:269) at org.drools.rule.constraint.MvelConstraint.access$200(MvelConstraint.java:50) at org.drools.rule.constraint.MvelConstraint$ConditionJitter.run(MvelConstraint.java:249) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
This problem disappear when the regexp is a constant string instead of a variable. No new thread is spawned when using the constant string.
The thread spawning was observed using a separate profiler tool.
The exception usually happens in the middle of the console output. A search on null pointer exception will get you there.