geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gianny Damour <gianny.dam...@optusnet.com.au>
Subject Re: class loading issue
Date Mon, 23 Jan 2006 11:02:22 GMT
Hello Tyler,

Could you please try this configuration?
1. set context-priority-classloader to true; and
2. put your own jdom, axis and commons-httpclient jars in WEB-INF/lib.

I think that it should work with this approach.

If not (due to Log4J initialization problem?), then could you please 
provide a stack-trace of the error?

Thanks,
Gianny


tbot55@yahoo.com wrote:

>I must be misunderstanding something. Here's my
>problem. I'm trying to use an application that
>requires a different version of jdom.jar and axis.jar,
>and it also uses commons-httpclient.jar, which isn't
>found in the geronimo repository.
>
>It does some webservices stuff. So I replace the
>jdom.jar in the repository directory and I bypass one
>of my problems. Then I have to somewhat merge the
>axis.jar it comes with and the one in the geronimo
>repository, and I overcome another problem (though now
>the daytrader example is breaking). After this, I'm
>getting a commons-httpclient class-not-found error,
>even though I've manually added it to the repository.
>
>So, I figure out another workaround: I set the
>context-priority-classloader variable to true in the
>geronimo-web.xml, and I modify the
>TomcatClassLoader.java file to this (full modified
>TomcatClassLoader.java file attached):
>------------------------------------------------------
>TomcatClassLoader.ResourceClassLoader.getResource:----
>------------------------------------------------------
>           if ((contextPriorityClassLoader &&
>                name.startsWith("org/apache/axis")) ||
>               (contextPriorityClassLoader &&
>               
>name.startsWith("org/apache/commons/httpclient"))){
>           }
>           else if (true
>||//!contextPriorityClassLoader ||
>...
>           return super.loadClass(name);
>       }
>------------------------------------------------------
>TomcatClassLoader.loadClass: -------------------------
>------------------------------------------------------
>           if ((contextPriorityClassLoader &&
>                name.startsWith("org.apache.axis")) ||
>               (contextPriorityClassLoader &&
>               
>name.startsWith("org.apache.commons.httpclient"))){
>           }
>           else if (true
>||//!contextPriorityClassLoader ||
>...
>               return super.loadClass(name);
>           }
>-----------------------------------------------------------
>-----------------------------------------------------------
>
>This makes the application work. Now, I did try just
>setting context-priority-classloader to true without
>doing these modifications, and I got errors about not
>initializing log4j properly. Is there a better way to
>make the class loader do what I want to do?
>
>Tyler
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam?  Yahoo! Mail has the best spam protection around 
>http://mail.yahoo.com 
>



Mime
View raw message