You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Martin Gainty <mg...@hotmail.com> on 2009/02/01 04:31:56 UTC

RE: [S2] Race condition in SpringObjectFactory class loader

Agreed!

its *remotely* possible that this is a Classloader error ..system classloader and app classloader both attempting to load different classes
This sort of thing shows up in weblogic/glassfish and websphere app servers
If you dont have it ..take a look at downloading the class here
http://www.jarfinder.com/index.php/java/info/com.opensymphony.xwork.spring.SpringObjectFactory
If you're using 2.1.6 Struts I vote for placing xwork 2.1.2.jar in Webapp/WEB-INF/lib

also.. clean off $TOMCAT_HOME/work folder

Martin
______________________________________________ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. 




> Date: Sat, 31 Jan 2009 11:38:59 -0500
> From: dale@newfield.org
> To: user@struts.apache.org
> Subject: Re: [S2] Race condition in SpringObjectFactory class loader
> 
> David Erickson wrote:
> > java.lang.LinkageError: loader (instance of
> > org/apache/catalina/loader/WebappClassLoader): attempted  duplicate
> > class definition for name: "com/x/y/ZAction"
> 
> I believe this error is thrown when there's more than one version of the 
> .class available in the classpath.  Are you sure that you don't have 
> more than one .jar in your WEB-INF/lib that defines more than one 
> version of this class?  I'd guess that there was an undeployment issue 
> and not all the jars got removed before redeploying the new war.  When 
> upgrading to 2.1.6 I had to delete the whole deployment directory when 
> the app server was off in order to clean out the old .jars.
> 
> -Dale
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 

_________________________________________________________________
Windows Live™: E-mail. Chat. Share. Get more ways to connect. 
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t2_allup_explore_012009

Re: RE: [S2] Race condition in SpringObjectFactory class loader

Posted by David Erickson <ha...@gmail.com>.
Yeah I keep the xwork jar local to my app in the web-inf/lib folder, and
verified repeatedly that my work directory was clean.. but no dice. Does
anyone know of a way to instrument the classloader to output the class its
defining and where from? I still believe it is some underlying race
condition where two threads are trying to define the same class at the same
time and this would help prove that. Thanks.

On Jan 31, 2009 7:32 PM, "Martin Gainty" <mg...@hotmail.com> wrote:


Agreed!

its *remotely* possible that this is a Classloader error ..system
classloader and app classloader both attempting to load different classes
This sort of thing shows up in weblogic/glassfish and websphere app servers
If you dont have it ..take a look at downloading the class here
http://www.jarfinder.com/index.php/java/info/com.opensymphony.xwork.spring.SpringObjectFactory
If you're using 2.1.6 Struts I vote for placing xwork 2.1.2.jar in
Webapp/WEB-INF/lib

also.. clean off $TOMCAT_HOME/work folder

Martin
______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official
business of Sender. This transmission is of a confidential nature and Sender
does not endorse distribution to any party other than intended recipient.
Sender does not necessarily endorse content contained within this
transmission.




> Date: Sat, 31 Jan 2009 11:38:59 -0500
> From: dale@newfield.org
> To: user@struts.apache.org
> Subject: Re: [S2] Race condition in SpringObjectFactory class loader

> > David Erickson wrote: > > java.lang.LinkageError: loader (instance of >
> org/apache/catalina/l...
_________________________________________________________________
Windows Live™: E-mail. Chat. Share. Get more ways to connect.
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t2_allup_explore_012009