Re: [rules-users] java.lang.LinkageError, but only sometimes
keDelegate(DelegatingFilterProxy.java:346) [spring-web-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259) [spring-web-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:] at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final] at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:] at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_30] - Original Message - From: "Wolfgang Laun" To: "Rules Users List" Sent: Thursday, November 22, 2012 2:16:28 PM Subject: Re: [rules-users] java.lang.LinkageError, but only sometimes On 22/11/2012, kenneth.westeli...@telenet.be wrote: > Hi, > > Thank you for your reply. My original post was wrongly obfuscated. This is > the correct stacktrace: In full?? -W ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] java.lang.LinkageError, but only sometimes
On 22/11/2012, kenneth.westeli...@telenet.be wrote: > Hi, > > Thank you for your reply. My original post was wrongly obfuscated. This is > the correct stacktrace: In full?? -W ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] java.lang.LinkageError, but only sometimes
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" To: "Rules Users List" 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 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@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
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 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@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] java.lang.LinkageError, but only sometimes
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@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] java.lang.LinkageError, but only sometimes
I'm guessing now. But since the stack trace includes org.drools.rule.JavaDialectRuntimeData I would rather say it is related to Java and not to MVEL. Actually org.drools.rule.MVELDialectRuntimeData seems to have less class-loading logic than JavaDialectRuntimeData so if this is indeed a bug a workaround may be to switch from java to mvel dialect. Another workaround could be to "warm up" your rules by firing them from a single thread before exposing the knowledge base to the multi-threaded client code. Regards, Mattias - Original Message - From: "kennywest" To: rules-users@lists.jboss.org Sent: Wednesday, 31 October, 2012 4:33:07 PM Subject: Re: [rules-users] java.lang.LinkageError, but only sometimes Thank you for your reply. I have created the following issue: https://issues.jboss.org/browse/JBRULES-3675 We are now running the same setup on 5.5.0.CR1 and so far, we haven't encountered the linkage error. Could this be related to mvel? -- View this message in context: http://drools.46999.n3.nabble.com/java-lang-LinkageError-but-only-sometimes-tp4020606p4020616.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] java.lang.LinkageError, but only sometimes
Cried wolf too soon :( Linkage error also occurs in 5.5.0.CR1 -- View this message in context: http://drools.46999.n3.nabble.com/java-lang-LinkageError-but-only-sometimes-tp4020606p4020618.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] java.lang.LinkageError, but only sometimes
Thank you for your reply. I have created the following issue: https://issues.jboss.org/browse/JBRULES-3675 We are now running the same setup on 5.5.0.CR1 and so far, we haven't encountered the linkage error. Could this be related to mvel? -- View this message in context: http://drools.46999.n3.nabble.com/java-lang-LinkageError-but-only-sometimes-tp4020606p4020616.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] java.lang.LinkageError, but only sometimes
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" Till: rules-users@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-sometimes-tp4020606.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[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-sometimes-tp4020606.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users