[rules-users] java.lang.LinkageError, but only sometimes

kenneth.westelinck at telenet.be kenneth.westelinck at telenet.be
Thu Nov 22 07:45:31 EST 2012


Hi,

Thank you for your reply. My original post was wrongly obfuscated. This is the correct stacktrace:
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_person___unique___name_656ee3db19d34e689d95e2d6b2be67b6Eval0InvokerGenerated.evaluate(Unknown Source)
        at a.b.c.Rule_person___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]

> Has there been some mixture of compiled packages in a way as it should not be done?
Hmmm, I don't understand very well, can you please elaborate?

> Is the procedure for generating these artificial names watertight?
I don't think I understand this either. The rules all have unique names. The name: "Rule_gg___unique___name_656ee3db19d34e689d95e2d6b2be67b6" is generated by drools itself.


----- Original Message -----
From: "Wolfgang Laun" <wolfgang.laun at gmail.com>
To: "Rules Users List" <rules-users at lists.jboss.org>
Sent: Thursday, November 22, 2012 10:51:57 AM
Subject: Re: [rules-users] java.lang.LinkageError, but only sometimes

Just in case this has been missed (and using some guesswork) I should
point out that the generated name extensions for the classes
containing the right hand side code in a method are identical for two
different rules clashing in the load of the serialized knowledge base.

a/b/c/Rule_person_unique___name_656ee3db19d34e689d95e2d6b2be67b6
    a.b.c.Rule_gg___unique___name_656ee3db19d34e689d95e2d6b2be67b6

Has there been some mixture of compiled packages in a way as it should
not be done? Is the procedure for generating these artificial names
watertight?

-W


On 22/11/2012, kennywest <kenneth.westelinck at telenet.be> wrote:
> I tried the suggestion from: https://issues.jboss.org/browse/JBRULES-3675
> by
> adding a synchronized to the loadClass method. After further testing the
> problem remains :( So adding synchronized does not solve the problem. Any
> bright ideas? I am willing to try everything :)
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/java-lang-LinkageError-but-only-sometimes-tp4020606p4020936.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


More information about the rules-users mailing list