Hi,
We are using a single (Drools 5.1.1) Stateless Sessions for the parallel processing of thousands of facts.
>From time to time we experienced the following error :
org.drools.runtime.rule.ConsequenceException: rule: Priorite - Groupe: TMK2612G01, P10
at org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:39)
at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:927)
at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:856)
at org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1071)
at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:785)
at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:751)
at org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:218)
at acme.srv.ept.service.impl.traitement.MoteurTraitementDemandes.traiterDemande(MoteurTraitementDemandes.java:121)
(...)
Caused by: java.util.ConcurrentModificationException
at java.util.HashMap$AbstractMapIterator.checkConcurrentMod(Unknown Source)
at java.util.HashMap$AbstractMapIterator.makeNext(Unknown Source)
at java.util.HashMap$KeyIterator.next(Unknown Source)
at java.util.HashMap.analyzeMap(Unknown Source)
at java.util.HashMap.rehash(Unknown Source)
at java.util.HashMap.rehash(Unknown Source)
at java.util.HashMap.putImpl(Unknown Source)
at java.util.HashMap.put(Unknown Source)
at org.drools.rule.JavaDialectRuntimeData$PackageClassLoader.loadClass(JavaDialectRuntimeData.java:503)
at java.lang.ClassLoader.loadClass(ClassLoader.java:609)
at acme.srv.ept.regle.Rule_Priorite___Groupe__TMK2612G01__P10_0DefaultConsequenceInvoker.evaluate(Rule_Priorite___Groupe__TMK2612G01__P10_0DefaultConsequenceInvoker.java:29)
at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:917)
... 49 more
We get the same error when we used a pool of Stateless Sessions (serial access) based on the same KnowledgeBase for the processing.
Thanks,