axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Lepine" <>
Subject RE: service classpath
Date Thu, 21 Jun 2007 13:00:07 GMT
That makes sense. Thank you for the response.



From: Chad DeBauch [] 
Sent: Wednesday, June 20, 2007 8:45 PM
Subject: Re: service classpath


Each aar file that you deploy has its own ClassLoader.  If there is code
in your service that needs to get resources such as xml files you need
to pass it the ClassLoader for that service.  For example if you have
this iBatis method in your service Resources.getResourceAsReader(String
resource), you must use this one instead
Resources.getResourceAsReader(ClassLoader classLoader, String resource).
You can get access to the ClassLoader for that service by calling


If you are not able to change the code that gets the resources, then you
have to put the resources in the WEB-INF/classes directory or if it is
bundled in a jar put it in WEB-INF/lib directory. 


On 6/20/07, Michael Lepine <> wrote:

Hello all. I still have classpath issues with my deployed aar archive
file and am hoping for some guidance. (My original post is below and
mentions log4j configuration as part of my issue, but that a side effect
of my classpath issue.)  I've reviewed the docs, faqs and wiki entries
on the Axis2 site and cannot find any topics on this, so I probably am
just missing something.


There are XML configuration files that my service needs access to when
deployed; however, with the aar configuration below, it does not find
them on the classpath once deployed. 


How do I deploy my service with configuration files so that it can find
and access those resources? Do I need to deploy the service differently?


Any guidance (and your time) is appreciated. Thank you.




From: Michael Lepine [] 
Sent: Tuesday, June 19, 2007 10:23 AM
Subject: service classpath


I'm not overly familiar with web services, but I've created a POJO-based
web service and am having difficultly logging from the service. The aar
archive has the following top-level directory structure:


com - class files under the package

META-INF - folder containing the services.xml

lib - folder containing library (jar/zip) files for service - property file for logging configuration - property file for log4j configuration

other.xml - other xml files that need to be accessible via the classpath


I'm deploying the aar file to the following folder under the tomcat
(version 5.0.28) installation directory:




The service is being deployed correctly and appears to be working.


So, should my properties and xml files be accessible via the classpath
or am I doing something wrong?


Any guidance is appreciated. Thank you.


- Mike


View raw message