Hi again, I've solved the problem with updating Drools from 5.4 to 5.5. I thought I'd updated it ones but seems that I worked on an older version.
Nice Weekend to everyone. Bojan ----- Ursprüngliche Mail ----- Von: "Bojan Janisch" <[email protected]> An: "Rules Users List" <[email protected]> Gesendet: Freitag, 14. Juni 2013 11:22:08 Betreff: Exception jitting Hello everyone, recently I'm using Drools in a multi-threaded environment. Since then I get sometimes RuntimeExceptions like this: Exception in thread "Thread-10" java.lang.RuntimeException: Exception jitting: getConcept().identifierSource.toLowerCase.contains("anatomy") at org.drools.rule.constraint.MvelConstraint.executeJitting(MvelConstraint.java:219) at org.drools.rule.constraint.MvelConstraint.access$000(MvelConstraint.java:41) at org.drools.rule.constraint.MvelConstraint$1.run(MvelConstraint.java:201) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:679) Caused by: java.lang.NoClassDefFoundError: [Lorg/drools/rule/Declaration; at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2416) at java.lang.Class.getConstructor0(Class.java:2726) at java.lang.Class.getConstructor(Class.java:1676) at org.drools.rule.builder.dialect.asm.ClassGenerator.newInstance(ClassGenerator.java:173) at org.drools.rule.constraint.ASMConditionEvaluatorJitter.jitEvaluator(ASMConditionEvaluatorJitter.java:53) at org.drools.rule.constraint.MvelConstraint.executeJitting(MvelConstraint.java:217) ... 5 more Caused by: java.lang.ClassNotFoundException: org.drools.rule.Declaration at java.lang.ClassLoader.findClass(ClassLoader.java:373) at java.lang.ClassLoader.loadClass(ClassLoader.java:321) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) ... 12 more The rule which produces the exception, is always another and there's also always another cause (so getConcept()... works fine). I've got the error message with this rule: import function rulevolution.utils.FactChecker.*; import function rulevolution.utils.ODMAnswerManager.*; global org.apache.uima.util.impl.JSR47Logger_impl log global org.apache.uima.jcas.JCas aJCas rule '129' when $0:NormalizedNamedEntity( ct_0:CoveredText, cp_0:Concept, label_0:getConcept().getPrefLabel().value, getConcept().identifierSource.toLowerCase.contains("bodyside")) not $1:NormalizedNamedEntity( ct_1:CoveredText, cp_1:Concept, label_1:getConcept().getPrefLabel().value, getConcept().identifierSource.toLowerCase.contains("anatomy")) $2:NormalizedNamedEntity( ct_2:CoveredText, cp_2:Concept, label_2:getConcept().getPrefLabel().value, endsWith($0,$2)) not $3:NormalizedNamedEntity( ct_3:CoveredText, cp_3:Concept, label_3:getConcept().getPrefLabel().value, endsWith($0,$2)) not $4:NormalizedNamedEntity( ct_4:CoveredText, cp_4:Concept, label_4:getConcept().getPrefLabel().value, endsWith($2,$0)) $5:NormalizedNamedEntity( ct_5:CoveredText, cp_5:Concept, label_5:getConcept().getPrefLabel().value, endsWith($0,$2)) not $6:NormalizedNamedEntity( ct_6:CoveredText, cp_6:Concept, label_6:getConcept().getPrefLabel().value, isBetween($6,$0,$5)) not $7:NormalizedNamedEntity( ct_7:CoveredText, cp_7:Concept, label_7:getConcept().getPrefLabel().value, getConcept().identifierSource.toLowerCase.contains("anatomy")) $8:NormalizedNamedEntity( ct_8:CoveredText, cp_8:Concept, label_8:getConcept().getPrefLabel().value, endsWith($8,$0)) then int start = getStart($0,$2,$5,$8); int ende = getStop($0,$2,$5,$8); String attribute = label_0+" "+label_2+" "+label_5+" "+label_8; insert(annotate(aJCas, "de.cloud4health.odm.eprd.itemGroup.operation", 0, attribute, start, ende, "", attribute)); end Like you see it is a huge rule, but it's created automatically with genetic evolution so I haven't written it actually. If I use this rule in a single threaded environment, everything runs fine, so could there be a multi-threading problem with Drools itself? Greetings Bojan _______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users
