I'm using Drools in a relatively vanilla fashion – not doing anything fancy; no custom DSLs or whatnot. I have a JUnit test case that invokes a set of rules. When the test case is run individually, it passes just fine. However, when the test case is run within a larger test suite (i.e., with other test cases), the test fails. When running the test suite, I do see an exception being thrown by Drools:
Exception in thread "Thread-1" java.lang.NullPointerException
I have experienced this behavior sporadically with other test cases as well. FYI, there is no shared data being consumed between test cases. Also, we are using stateless knowledge sessions. Each individual test case will get its own fresh stateless knowledge session instance.
Is there a way to disable JIT'ing within Drools? (as this seems to be a JIT-related issue). FYI, I experience this issue in the following Drools releases: 5.3.3.Final, 5.4.0.Final and 5.5.0.CR1.