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

2012-11-22 Thread kenneth . westelinck
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

2012-11-22 Thread Wolfgang Laun
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

2012-11-22 Thread kenneth . westelinck
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

2012-11-22 Thread Wolfgang Laun
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

2012-11-22 Thread kennywest
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

2012-10-31 Thread Mattias Nilsson Grip
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

2012-10-31 Thread kennywest
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

2012-10-31 Thread kennywest
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

2012-10-31 Thread Mattias Nilsson Grip
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

2012-10-31 Thread kennywest
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


Re: [rules-users] java.lang.LinkageError

2012-08-22 Thread Winfried
We experience exactly the same behaviour/exceptions. I can reproduce 
this with following pattern:

1. Deploy application to Glassfish -> KnowledgeBase gets initialized 
from a .drl file and hold in a singleton
2. Run a multithreaded client sending requests to the application. Each 
request creates a stateful session out of the KnowledgeBase
3. The reported exceptions are thrown

Everything runs fine when sending a single initial request before 
running the multithreaded client.

Regarding compilation environment: Everything is compiled and runs on a 
single machine, i can assure there is only one java version involved.

For me this also looks like a multithreaded class loading issue as 
mentioned by David.



  Our rules are not precompiled

On 08/20/2012 10:00 PM, David Minor wrote:
> We've managed to determine that the problem only happens *sometimes*
> when the rule base is deserialized. Our current theory is that it's a
> multithreaded class loading issue, although our synchronization
> attempts haven't mitigated it.
>
> We've also seen this variation on the linkage error:
>
> Caused by: java.lang.LinkageError: loader (instance of
> org/drools/rule/JavaDialectRuntimeData$PackageClassLoader): attempted
> duplicate class definition for name:
> "ShoppingCart/Rule_CSPATCHARES5211_CSPATCHARES5211_dd9600d3d08d460caa50fe7c29ee5585"
>  at java.lang.ClassLoader.defineClass1(Native Method)
>  at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
>  at 
> org.drools.rule.JavaDialectRuntimeData$PackageClassLoader.fastFindClass(JavaDialectRuntimeData.java:615)
>  at 
> org.drools.util.CompositeClassLoader$CachingLoader.load(CompositeClassLoader.java:254)
>  at 
> org.drools.util.CompositeClassLoader$CachingLoader.load(CompositeClassLoader.java:237)
>  at 
> org.drools.util.CompositeClassLoader.loadClass(CompositeClassLoader.java:88)
>  at java.lang.ClassLoader.loadClass(ClassLoader.java:410)
>  at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
>  at 
> ShoppingCart.Rule_CSPATCHARES5211_CSPATCHARES5211_dd9600d3d08d460caa50fe7c29ee5585Eval0InvokerGenerated.evaluate(Unknown
> Source)
>  at 
> ShoppingCart.Rule_CSPATCHARES5211_CSPATCHARES5211_dd9600d3d08d460caa50fe7c29ee5585Eval0Invoker.evaluate(Unknown
> Source)
>  at org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:114)
>  at 
> org.drools.reteoo.EvalConditionNode.assertLeftTuple(EvalConditionNode.java:178)
> ...
>
> On Fri, Aug 17, 2012 at 9:37 AM, David Minor  wrote:
>> The webapps are both running in the same instance of Tomcat.
>>
>> We're going to try to run a second instance of Tomcat on production
>> with the new version to see if we can replicate it.
>>
>> On Fri, Aug 17, 2012 at 8:33 AM, Wolfgang Laun  
>> wrote:
>>> On 17/08/2012, David Minor  wrote:
 That was the root error, the rest is just drools firing its rules.

 So does this mean there's some sort of incompatibility in the class
 ShoppingCart/Rule_CSMEGBUL_b996907c25e3495a94b6b041c1c08c50? I assume
 this is a class that's auto-generated by drools. Is it possible that
 serializing the rule Package is leading to an incompatible class
 definition?
>>> It does contain compiled Java code. So if the DRL/Java compilation
>>> environment compared to the deployment environment differs w.r.t. to
>>> JDK version, you're in for trouble.
>>> -W
>>>
 On Thu, Aug 16, 2012 at 10:41 PM, Wolfgang Laun 
 wrote:
> Javadoc: Subclasses of LinkageError indicate that a class has some
> dependency on another class; however, the latter class has
> incompatibly changed after the compilation of the former class.
>
> Looks like some incompatibility between your development and
> deployment environment.
>
> Did you truncate any helpful message from the stack trace?
>
> -W
>
> On 17/08/2012, David Minor  wrote:
>> Hi,
>>
>> We're in the process of moving our web apps from Java 5 to Java 7 and
>> Drools 3 to Drools 5.4.0. Our rule base is compiled and serialized to
>> the db by one app, and read from the db and fired by another.
>>
>> Everything went fine during testing, but when we tried to switch to
>> production we got this when firing the rule base:
>>
>> Caused by: java.lang.LinkageError:
>> ShoppingCart/Rule_CSMEGBUL_b996907c25e3495a94b6b041c1c08c50
>>  at
>> ShoppingCart.Rule_CSMEGBUL_b996907c25e3495a94b6b041c1c08c50Eval0InvokerGenerated.evaluate(Unknown
>> Source)
>>  at
>> ShoppingCart.Rule_CSMEGBUL_b996907c25e3495a94b6b041c1c08c50Eval0Invoker.evaluate(Unknown
>> Source)
>>  at
>> org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:114)
>>  at
>> org.drools.reteoo.EvalConditionNode.assertLeftTuple(EvalConditionNode.java:178)
>> [snip]
>>
>> Does anyone have any ideas as to what might cause t

Re: [rules-users] java.lang.LinkageError

2012-08-20 Thread David Minor
We've managed to determine that the problem only happens *sometimes*
when the rule base is deserialized. Our current theory is that it's a
multithreaded class loading issue, although our synchronization
attempts haven't mitigated it.

We've also seen this variation on the linkage error:

Caused by: java.lang.LinkageError: loader (instance of
org/drools/rule/JavaDialectRuntimeData$PackageClassLoader): attempted
duplicate class definition for name:
"ShoppingCart/Rule_CSPATCHARES5211_CSPATCHARES5211_dd9600d3d08d460caa50fe7c29ee5585"
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
at 
org.drools.rule.JavaDialectRuntimeData$PackageClassLoader.fastFindClass(JavaDialectRuntimeData.java:615)
at 
org.drools.util.CompositeClassLoader$CachingLoader.load(CompositeClassLoader.java:254)
at 
org.drools.util.CompositeClassLoader$CachingLoader.load(CompositeClassLoader.java:237)
at 
org.drools.util.CompositeClassLoader.loadClass(CompositeClassLoader.java:88)
at java.lang.ClassLoader.loadClass(ClassLoader.java:410)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at 
ShoppingCart.Rule_CSPATCHARES5211_CSPATCHARES5211_dd9600d3d08d460caa50fe7c29ee5585Eval0InvokerGenerated.evaluate(Unknown
Source)
at 
ShoppingCart.Rule_CSPATCHARES5211_CSPATCHARES5211_dd9600d3d08d460caa50fe7c29ee5585Eval0Invoker.evaluate(Unknown
Source)
at org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:114)
at 
org.drools.reteoo.EvalConditionNode.assertLeftTuple(EvalConditionNode.java:178)
...

On Fri, Aug 17, 2012 at 9:37 AM, David Minor  wrote:
> The webapps are both running in the same instance of Tomcat.
>
> We're going to try to run a second instance of Tomcat on production
> with the new version to see if we can replicate it.
>
> On Fri, Aug 17, 2012 at 8:33 AM, Wolfgang Laun  
> wrote:
>> On 17/08/2012, David Minor  wrote:
>>> That was the root error, the rest is just drools firing its rules.
>>>
>>> So does this mean there's some sort of incompatibility in the class
>>> ShoppingCart/Rule_CSMEGBUL_b996907c25e3495a94b6b041c1c08c50? I assume
>>> this is a class that's auto-generated by drools. Is it possible that
>>> serializing the rule Package is leading to an incompatible class
>>> definition?
>>
>> It does contain compiled Java code. So if the DRL/Java compilation
>> environment compared to the deployment environment differs w.r.t. to
>> JDK version, you're in for trouble.
>> -W
>>
>>>
>>> On Thu, Aug 16, 2012 at 10:41 PM, Wolfgang Laun 
>>> wrote:
 Javadoc: Subclasses of LinkageError indicate that a class has some
 dependency on another class; however, the latter class has
 incompatibly changed after the compilation of the former class.

 Looks like some incompatibility between your development and
 deployment environment.

 Did you truncate any helpful message from the stack trace?

 -W

 On 17/08/2012, David Minor  wrote:
> Hi,
>
> We're in the process of moving our web apps from Java 5 to Java 7 and
> Drools 3 to Drools 5.4.0. Our rule base is compiled and serialized to
> the db by one app, and read from the db and fired by another.
>
> Everything went fine during testing, but when we tried to switch to
> production we got this when firing the rule base:
>
> Caused by: java.lang.LinkageError:
> ShoppingCart/Rule_CSMEGBUL_b996907c25e3495a94b6b041c1c08c50
> at
> ShoppingCart.Rule_CSMEGBUL_b996907c25e3495a94b6b041c1c08c50Eval0InvokerGenerated.evaluate(Unknown
> Source)
> at
> ShoppingCart.Rule_CSMEGBUL_b996907c25e3495a94b6b041c1c08c50Eval0Invoker.evaluate(Unknown
> Source)
> at
> org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:114)
> at
> org.drools.reteoo.EvalConditionNode.assertLeftTuple(EvalConditionNode.java:178)
> [snip]
>
> Does anyone have any ideas as to what might cause this?
>
> Here is the rule in question if that helps:
>
> rule "CSMEGBUL"
> salience -1
> agenda-group "SubtotalDependent"
> when
> delegate: PromotionRuleDelegate ( )
> cart: ShoppingCart ( )
> eval (
> delegate.checkDateRange("118171800","149733720") )
> eval ( delegate.checkEnabled("false") )
> eval ( delegate.cartHasPromoCode(cart, "CSMEGBUL") )
> eval ( delegate.checkUsage(1,100027) )
> then
> delegate.applyOrderDiscountAmount(cart, 100027, "10.0");
> delegate.promoCodeApplied(cart, "CSMEGBUL");
> end
>
>
> --
> _
> David Minor
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
>

Re: [rules-users] java.lang.LinkageError

2012-08-17 Thread David Minor
The webapps are both running in the same instance of Tomcat.

We're going to try to run a second instance of Tomcat on production
with the new version to see if we can replicate it.

On Fri, Aug 17, 2012 at 8:33 AM, Wolfgang Laun  wrote:
> On 17/08/2012, David Minor  wrote:
>> That was the root error, the rest is just drools firing its rules.
>>
>> So does this mean there's some sort of incompatibility in the class
>> ShoppingCart/Rule_CSMEGBUL_b996907c25e3495a94b6b041c1c08c50? I assume
>> this is a class that's auto-generated by drools. Is it possible that
>> serializing the rule Package is leading to an incompatible class
>> definition?
>
> It does contain compiled Java code. So if the DRL/Java compilation
> environment compared to the deployment environment differs w.r.t. to
> JDK version, you're in for trouble.
> -W
>
>>
>> On Thu, Aug 16, 2012 at 10:41 PM, Wolfgang Laun 
>> wrote:
>>> Javadoc: Subclasses of LinkageError indicate that a class has some
>>> dependency on another class; however, the latter class has
>>> incompatibly changed after the compilation of the former class.
>>>
>>> Looks like some incompatibility between your development and
>>> deployment environment.
>>>
>>> Did you truncate any helpful message from the stack trace?
>>>
>>> -W
>>>
>>> On 17/08/2012, David Minor  wrote:
 Hi,

 We're in the process of moving our web apps from Java 5 to Java 7 and
 Drools 3 to Drools 5.4.0. Our rule base is compiled and serialized to
 the db by one app, and read from the db and fired by another.

 Everything went fine during testing, but when we tried to switch to
 production we got this when firing the rule base:

 Caused by: java.lang.LinkageError:
 ShoppingCart/Rule_CSMEGBUL_b996907c25e3495a94b6b041c1c08c50
 at
 ShoppingCart.Rule_CSMEGBUL_b996907c25e3495a94b6b041c1c08c50Eval0InvokerGenerated.evaluate(Unknown
 Source)
 at
 ShoppingCart.Rule_CSMEGBUL_b996907c25e3495a94b6b041c1c08c50Eval0Invoker.evaluate(Unknown
 Source)
 at
 org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:114)
 at
 org.drools.reteoo.EvalConditionNode.assertLeftTuple(EvalConditionNode.java:178)
 [snip]

 Does anyone have any ideas as to what might cause this?

 Here is the rule in question if that helps:

 rule "CSMEGBUL"
 salience -1
 agenda-group "SubtotalDependent"
 when
 delegate: PromotionRuleDelegate ( )
 cart: ShoppingCart ( )
 eval (
 delegate.checkDateRange("118171800","149733720") )
 eval ( delegate.checkEnabled("false") )
 eval ( delegate.cartHasPromoCode(cart, "CSMEGBUL") )
 eval ( delegate.checkUsage(1,100027) )
 then
 delegate.applyOrderDiscountAmount(cart, 100027, "10.0");
 delegate.promoCodeApplied(cart, "CSMEGBUL");
 end


 --
 _
 David Minor
 ___
 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
>>
>>
>>
>> --
>> _
>> David Minor
>> ___
>> 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



-- 
_
David Minor
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] java.lang.LinkageError

2012-08-17 Thread Wolfgang Laun
On 17/08/2012, David Minor  wrote:
> That was the root error, the rest is just drools firing its rules.
>
> So does this mean there's some sort of incompatibility in the class
> ShoppingCart/Rule_CSMEGBUL_b996907c25e3495a94b6b041c1c08c50? I assume
> this is a class that's auto-generated by drools. Is it possible that
> serializing the rule Package is leading to an incompatible class
> definition?

It does contain compiled Java code. So if the DRL/Java compilation
environment compared to the deployment environment differs w.r.t. to
JDK version, you're in for trouble.
-W

>
> On Thu, Aug 16, 2012 at 10:41 PM, Wolfgang Laun 
> wrote:
>> Javadoc: Subclasses of LinkageError indicate that a class has some
>> dependency on another class; however, the latter class has
>> incompatibly changed after the compilation of the former class.
>>
>> Looks like some incompatibility between your development and
>> deployment environment.
>>
>> Did you truncate any helpful message from the stack trace?
>>
>> -W
>>
>> On 17/08/2012, David Minor  wrote:
>>> Hi,
>>>
>>> We're in the process of moving our web apps from Java 5 to Java 7 and
>>> Drools 3 to Drools 5.4.0. Our rule base is compiled and serialized to
>>> the db by one app, and read from the db and fired by another.
>>>
>>> Everything went fine during testing, but when we tried to switch to
>>> production we got this when firing the rule base:
>>>
>>> Caused by: java.lang.LinkageError:
>>> ShoppingCart/Rule_CSMEGBUL_b996907c25e3495a94b6b041c1c08c50
>>> at
>>> ShoppingCart.Rule_CSMEGBUL_b996907c25e3495a94b6b041c1c08c50Eval0InvokerGenerated.evaluate(Unknown
>>> Source)
>>> at
>>> ShoppingCart.Rule_CSMEGBUL_b996907c25e3495a94b6b041c1c08c50Eval0Invoker.evaluate(Unknown
>>> Source)
>>> at
>>> org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:114)
>>> at
>>> org.drools.reteoo.EvalConditionNode.assertLeftTuple(EvalConditionNode.java:178)
>>> [snip]
>>>
>>> Does anyone have any ideas as to what might cause this?
>>>
>>> Here is the rule in question if that helps:
>>>
>>> rule "CSMEGBUL"
>>> salience -1
>>> agenda-group "SubtotalDependent"
>>> when
>>> delegate: PromotionRuleDelegate ( )
>>> cart: ShoppingCart ( )
>>> eval (
>>> delegate.checkDateRange("118171800","149733720") )
>>> eval ( delegate.checkEnabled("false") )
>>> eval ( delegate.cartHasPromoCode(cart, "CSMEGBUL") )
>>> eval ( delegate.checkUsage(1,100027) )
>>> then
>>> delegate.applyOrderDiscountAmount(cart, 100027, "10.0");
>>> delegate.promoCodeApplied(cart, "CSMEGBUL");
>>> end
>>>
>>>
>>> --
>>> _
>>> David Minor
>>> ___
>>> 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
>
>
>
> --
> _
> David Minor
> ___
> 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

2012-08-17 Thread David Minor
That was the root error, the rest is just drools firing its rules.

So does this mean there's some sort of incompatibility in the class
ShoppingCart/Rule_CSMEGBUL_b996907c25e3495a94b6b041c1c08c50? I assume
this is a class that's auto-generated by drools. Is it possible that
serializing the rule Package is leading to an incompatible class
definition?

On Thu, Aug 16, 2012 at 10:41 PM, Wolfgang Laun  wrote:
> Javadoc: Subclasses of LinkageError indicate that a class has some
> dependency on another class; however, the latter class has
> incompatibly changed after the compilation of the former class.
>
> Looks like some incompatibility between your development and
> deployment environment.
>
> Did you truncate any helpful message from the stack trace?
>
> -W
>
> On 17/08/2012, David Minor  wrote:
>> Hi,
>>
>> We're in the process of moving our web apps from Java 5 to Java 7 and
>> Drools 3 to Drools 5.4.0. Our rule base is compiled and serialized to
>> the db by one app, and read from the db and fired by another.
>>
>> Everything went fine during testing, but when we tried to switch to
>> production we got this when firing the rule base:
>>
>> Caused by: java.lang.LinkageError:
>> ShoppingCart/Rule_CSMEGBUL_b996907c25e3495a94b6b041c1c08c50
>> at
>> ShoppingCart.Rule_CSMEGBUL_b996907c25e3495a94b6b041c1c08c50Eval0InvokerGenerated.evaluate(Unknown
>> Source)
>> at
>> ShoppingCart.Rule_CSMEGBUL_b996907c25e3495a94b6b041c1c08c50Eval0Invoker.evaluate(Unknown
>> Source)
>> at org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:114)
>> at
>> org.drools.reteoo.EvalConditionNode.assertLeftTuple(EvalConditionNode.java:178)
>> [snip]
>>
>> Does anyone have any ideas as to what might cause this?
>>
>> Here is the rule in question if that helps:
>>
>> rule "CSMEGBUL"
>> salience -1
>> agenda-group "SubtotalDependent"
>> when
>> delegate: PromotionRuleDelegate ( )
>> cart: ShoppingCart ( )
>> eval (
>> delegate.checkDateRange("118171800","149733720") )
>> eval ( delegate.checkEnabled("false") )
>> eval ( delegate.cartHasPromoCode(cart, "CSMEGBUL") )
>> eval ( delegate.checkUsage(1,100027) )
>> then
>> delegate.applyOrderDiscountAmount(cart, 100027, "10.0");
>> delegate.promoCodeApplied(cart, "CSMEGBUL");
>> end
>>
>>
>> --
>> _
>> David Minor
>> ___
>> 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



-- 
_
David Minor
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] java.lang.LinkageError

2012-08-16 Thread Wolfgang Laun
Javadoc: Subclasses of LinkageError indicate that a class has some
dependency on another class; however, the latter class has
incompatibly changed after the compilation of the former class.

Looks like some incompatibility between your development and
deployment environment.

Did you truncate any helpful message from the stack trace?

-W

On 17/08/2012, David Minor  wrote:
> Hi,
>
> We're in the process of moving our web apps from Java 5 to Java 7 and
> Drools 3 to Drools 5.4.0. Our rule base is compiled and serialized to
> the db by one app, and read from the db and fired by another.
>
> Everything went fine during testing, but when we tried to switch to
> production we got this when firing the rule base:
>
> Caused by: java.lang.LinkageError:
> ShoppingCart/Rule_CSMEGBUL_b996907c25e3495a94b6b041c1c08c50
> at
> ShoppingCart.Rule_CSMEGBUL_b996907c25e3495a94b6b041c1c08c50Eval0InvokerGenerated.evaluate(Unknown
> Source)
> at
> ShoppingCart.Rule_CSMEGBUL_b996907c25e3495a94b6b041c1c08c50Eval0Invoker.evaluate(Unknown
> Source)
> at org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:114)
> at
> org.drools.reteoo.EvalConditionNode.assertLeftTuple(EvalConditionNode.java:178)
> [snip]
>
> Does anyone have any ideas as to what might cause this?
>
> Here is the rule in question if that helps:
>
> rule "CSMEGBUL"
> salience -1
> agenda-group "SubtotalDependent"
> when
> delegate: PromotionRuleDelegate ( )
> cart: ShoppingCart ( )
> eval (
> delegate.checkDateRange("118171800","149733720") )
> eval ( delegate.checkEnabled("false") )
> eval ( delegate.cartHasPromoCode(cart, "CSMEGBUL") )
> eval ( delegate.checkUsage(1,100027) )
> then
> delegate.applyOrderDiscountAmount(cart, 100027, "10.0");
> delegate.promoCodeApplied(cart, "CSMEGBUL");
> end
>
>
> --
> _
> David Minor
> ___
> 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

2012-08-16 Thread David Minor
Hi,

We're in the process of moving our web apps from Java 5 to Java 7 and
Drools 3 to Drools 5.4.0. Our rule base is compiled and serialized to
the db by one app, and read from the db and fired by another.

Everything went fine during testing, but when we tried to switch to
production we got this when firing the rule base:

Caused by: java.lang.LinkageError:
ShoppingCart/Rule_CSMEGBUL_b996907c25e3495a94b6b041c1c08c50
at 
ShoppingCart.Rule_CSMEGBUL_b996907c25e3495a94b6b041c1c08c50Eval0InvokerGenerated.evaluate(Unknown
Source)
at 
ShoppingCart.Rule_CSMEGBUL_b996907c25e3495a94b6b041c1c08c50Eval0Invoker.evaluate(Unknown
Source)
at org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:114)
at 
org.drools.reteoo.EvalConditionNode.assertLeftTuple(EvalConditionNode.java:178)
[snip]

Does anyone have any ideas as to what might cause this?

Here is the rule in question if that helps:

rule "CSMEGBUL"
salience -1
agenda-group "SubtotalDependent"
when
delegate: PromotionRuleDelegate ( )
cart: ShoppingCart ( )
eval (
delegate.checkDateRange("118171800","149733720") )
eval ( delegate.checkEnabled("false") )
eval ( delegate.cartHasPromoCode(cart, "CSMEGBUL") )
eval ( delegate.checkUsage(1,100027) )
then
delegate.applyOrderDiscountAmount(cart, 100027, "10.0");
delegate.promoCodeApplied(cart, "CSMEGBUL");
end


-- 
_
David Minor
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users