You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by E Koutsoudaki <s0...@sms.ed.ac.uk> on 2007/07/13 14:11:54 UTC

axis - tomcat "loader constraint violation"

Dear all,
as part of a project I am working on I have to add to an existent Java 
based web
application the functionality of retrieving information from the NCBI 
web service.
I have generated the Java source files by following the instructions in 
the NCBI website
at:
http://www.ncbi.nlm.nih.gov/entrez/q...java_help.html

The source files are created and they compile. For testing reasons I 
have implement a
Java application (not web based) from which I was able to retrieve 
information from the
NCBI resources.
When integrate the source files into the web based application, again 
the project builds
fine, but when running the following error occurs:

java.lang.LinkageError: loader constraint violation: when resolving 
field "service" the
class loader (instance of org/apache/catalina/loader/WebappClassLoader) 
of the referring
class, org/apache/axis/client/Stub, and the class loader (instance of
org/apache/catalina/loader/StandardClassLoader) for the field's resolved type,
javax/xml/rpc/Service, have different Class objects for that type
gov.nih.nlm.ncbi.www.soap.eutils.EUtilsServiceSoap
Stub.<init>(EUtilsServiceSoapStub.java:201)
gov.nih.nlm.ncbi.www.soap.eutils.EUtilsServiceSoap
Stub.<init>(EUtilsServiceSoapStub.java:193)
gov.nih.nlm.ncbi.http://www.soap.eutils.EUtilsService...ocator.java:55)
gov.nih.nlm.ncbi.http://www.soap.eutils.EUtilsService...ocator.java:50)
uk.ac.ed.gti.utilities.BioLayoutFile.getNCBIInfo(B ioLayoutFile.java:196)


The web based application runs on a Tomcat server and the axis library 
files have been
added in the common/lib folder of the web server so as the web server 
to be able to
locate the libraries.

The axis version I've used is the 1.4, Tomcat 5.5 and jdk 1.6.0_01.
I have also tried by using the axis-1_2_1, and jdk1.5.0_12. and 
generally other
combinations of those. I always keep Tomcat to 5.5 since this is the 
version of the
existing web application.

I would be grateful for any enlightenment about the occurring error.
Thank you in advance.
Elisavet Koutsoudaki


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Problem with Tomcat 5.5 clustering

Posted by Thomas Gaudin <tg...@sigma.fr>.
Hi,

I Have two Tomcat Cluster (version 5.5 and jdk 1.5)

I've configured my Tomcat with Cluster TAG and when I start Tomcat 
server, I have this message in the log file :

WARNING: Manager [/Exemple], requesting session state from 
org.apache.catalina.cluster.mcast.McastMember[tcp://127.0.0.1:4001,catalina,127.0.0.1,4001, 
alive=4390055]. This operation will timeout if no session state has been 
received within 60 seconds.

...

Jul 13, 2007 12:49:29 PM 
org.apache.catalina.cluster.tcp.SimpleTcpCluster memberDisappeared
 151 INFO: Received member 
disappeared:org.apache.catalina.cluster.mcast.McastMember[tcp://127.0.0.1:4001,catalina,127.0.0.1,4001, 
alive=4402145]

And then when I work with my web site, I ve this message :

SEVERE: Unable to send replicated message, is member 
[PooledSocketSender[/127.0.0.1:4001]] down?
java.net.ConnectException: Connection refused


The result is when I stop a Tomcat server to test the replication, I ve 
no replication between my two servers.

Any Idee?

Thanks,

Thomas.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: axis - tomcat "loader constraint violation"

Posted by "Reich, Matthias" <ma...@siemens.com>.
Hi,

it looks as if class

javax/xml/rpc/Service

was as well found in common/lib as in the WEB-INF/lib folder of your
webapp.

If the webapp classloader looks for this class, it will first look in
webapps private resources.
However, the class had been loaded and resolved before via the common
classloader when some other class had referred to it.
If javax/xml/rpc/Service would not be accessible via the webapp's
private resources,
the webapp classloader would delegate the task of loading the class to
it's parent classloader,
an then no conflict would arise.

You should take care to have classes located *either* in the common
classpath *or* in the webapp classpath, but not in both of them.

Regards,
Matthias 

> -----Original Message-----
> From: E Koutsoudaki [mailto:s0671837@sms.ed.ac.uk] 
> Sent: Friday, July 13, 2007 2:12 PM
> To: users@tomcat.apache.org
> Subject: axis - tomcat "loader constraint violation"
> 
> Dear all,
> as part of a project I am working on I have to add to an 
> existent Java 
> based web
> application the functionality of retrieving information from the NCBI 
> web service.
> I have generated the Java source files by following the 
> instructions in 
> the NCBI website
> at:
> http://www.ncbi.nlm.nih.gov/entrez/q...java_help.html
> 
> The source files are created and they compile. For testing reasons I 
> have implement a
> Java application (not web based) from which I was able to retrieve 
> information from the
> NCBI resources.
> When integrate the source files into the web based application, again 
> the project builds
> fine, but when running the following error occurs:
> 
> java.lang.LinkageError: loader constraint violation: when resolving 
> field "service" the
> class loader (instance of 
> org/apache/catalina/loader/WebappClassLoader) 
> of the referring
> class, org/apache/axis/client/Stub, and the class loader (instance of
> org/apache/catalina/loader/StandardClassLoader) for the 
> field's resolved type,
> javax/xml/rpc/Service, have different Class objects for that type
> gov.nih.nlm.ncbi.www.soap.eutils.EUtilsServiceSoap
> Stub.<init>(EUtilsServiceSoapStub.java:201)
> gov.nih.nlm.ncbi.www.soap.eutils.EUtilsServiceSoap
> Stub.<init>(EUtilsServiceSoapStub.java:193)
> gov.nih.nlm.ncbi.http://www.soap.eutils.EUtilsService...ocator
> .java:55)
> gov.nih.nlm.ncbi.http://www.soap.eutils.EUtilsService...ocator
> .java:50)
> uk.ac.ed.gti.utilities.BioLayoutFile.getNCBIInfo(B 
> ioLayoutFile.java:196)
> 
> 
> The web based application runs on a Tomcat server and the 
> axis library 
> files have been
> added in the common/lib folder of the web server so as the web server 
> to be able to
> locate the libraries.
> 
> The axis version I've used is the 1.4, Tomcat 5.5 and jdk 1.6.0_01.
> I have also tried by using the axis-1_2_1, and jdk1.5.0_12. and 
> generally other
> combinations of those. I always keep Tomcat to 5.5 since this is the 
> version of the
> existing web application.
> 
> I would be grateful for any enlightenment about the occurring error.
> Thank you in advance.
> Elisavet Koutsoudaki
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org