----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------

>  Now things have changed. Based on user input, foo.class dynamically loads
>  a class which also exists in /aa/bb along with foo.class. foo.class can't
>  find the class. this is because of jserv configuration. if /aa/bb is
>  put in the jserv.properties file:
>   wrapper.classpath=/aa/bb
> 
>  Then foo.class can find and load the class, but this messes up
>  auto-reload. 
> 
>  Does this call for a custom class loader??
> 
>  It is important that the classes are dynamically loaded for the
>  application i have (i.e. that classes can be added/created after
>  jserv starts up...). Any help would be appreciated.

I feel like a broken record sometimes...

Apache JServ uses two class loaders to find classes:

#1. System classloader
#2. Adaptive classloader ( this is a custom classloader )

wrapper.classpath= is the systemclassloader
repositories= is the adaptive classloader

If a class in the repositories path does a Class.forName() for a class
that is in the System classloader, it will find it.

If a class in the wrapper.classpath does a Class.forName() for a class in
the repositories path, then it won't find it. Reason is simple, the System
classloader doesn't know anything about the custom class loaders. The
opposite is true though. Custom class loaders know about the system
classloader.

make sense?

So, your problem is where you have your files.

-jon

-- 
Scarab -
      Java Servlet Based - Open Source 
         Bug/Issue Tracking System
        <http://scarab.tigris.org/>


--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to