Hi Kenneth,
I have never experienced this myself, but after having a quick look at the code I believe
this could be a multi-threading problem. In the abstract class java.lang.ClassLoader the
method loadClass(String, boolean) is synchronized, but both
org.drools.util.CompositeClassLoader and
org.drools.rule.JavaDialectRuntimeData$PackageClassLoader override this method without the
use of "synchronized".
I would suggest you create a JIRA issue for this.
Regards,
Mattias
----- Ursprungligt meddelande -----
Från: "kennywest" <kenneth.westelinck(a)telenet.be>
Till: rules-users(a)lists.jboss.org
Skickat: onsdag, 31 okt 2012 12:41:29
Ämne: [rules-users] java.lang.LinkageError, but only sometimes
Dear list,
We have an application (A) deployed on JBoss 7.1.1 accepting commands (CQRS,
but only C and Q :) ). A console application (B) is sending a large volume
of commands to create entities in A. Entities in A are validated by Drools
(plain drl files, configured in spring using drools-spring). Most of the
time this works just fine. But sometimes, we get the following exception:
java.lang.LinkageError: loader (instance of
org/drools/rule/JavaDialectRuntimeData$PackageClassLoader): attempted
duplicate class definition for name:
"a/b/c/Rule_person_unique___name_656ee3db19d34e689d95e2d6b2be67b6"
at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.6.0_30]
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
[rt.jar:1.6.0_30]
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
[rt.jar:1.6.0_30]
at
org.drools.rule.JavaDialectRuntimeData$PackageClassLoader.fastFindClass(JavaDialectRuntimeData.java:615)
[drools-core-5.4.0.Final.jar:5.4.0.Final]
at
org.drools.util.CompositeClassLoader$CachingLoader.load(CompositeClassLoader.java:254)
[knowledge-api-5.4.0.Final.jar:5.4.0.Final]
at
org.drools.util.CompositeClassLoader$CachingLoader.load(CompositeClassLoader.java:237)
[knowledge-api-5.4.0.Final.jar:5.4.0.Final]
at
org.drools.util.CompositeClassLoader.loadClass(CompositeClassLoader.java:88)
[knowledge-api-5.4.0.Final.jar:5.4.0.Final]
at java.lang.ClassLoader.loadClass(ClassLoader.java:295) [rt.jar:1.6.0_30]
at java.lang.ClassLoader.loadClass(ClassLoader.java:247) [rt.jar:1.6.0_30]
at
a.b.c.Rule_gg___unique___name_656ee3db19d34e689d95e2d6b2be67b6Eval0InvokerGenerated.evaluate(Unknown
Source)
at
a.b.c.Rule_gg___unique___name_656ee3db19d34e689d95e2d6b2be67b6Eval0Invoker.evaluate(Unknown
Source)
at org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:114)
[drools-core-5.4.0.Final.jar:5.4.0.Final]
Any idea where this is coming from or what's causing this.
We are using:
- JBoss 7.1.1
- drools 5.4.0.Final
- jdk 1.6u30
- Windows 7 64 bit
regards,
Kenneth
--
View this message in context:
http://drools.46999.n3.nabble.com/java-lang-LinkageError-but-only-sometim...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users