This works, in fact! I could swear I've tried that yesterday, and it threw me tons of NoClassDefFoundErrors, but anyway now it works. Thanks a lot for your help Charlie.
Anyway I'm still not quite confident. I still have no idea why I get null from getClassLoader() calls on classes in common/lib. Could you Charlie, or perhaps someone else, confirm that this is generally the case, not only because of some faulty configuration in my environment I"m not aware of? If this is really the normal behavior I wonder how I can get a class to return null on getClassLoader(), besides exposing it to the bootstrap class loader. Thanks and regards, Volker Cox, Charlie wrote: >well, I don't know why that is happening, but it does appear that you can >unpack your jar to get it to work. While certainly not ideal, it looks like >it may work. > >Charlie > > > > >>-----Original Message----- >>From: Volker Leidl [mailto:[EMAIL PROTECTED]] >>Sent: Friday, October 04, 2002 4:02 AM >>To: Tomcat Users List >>Subject: Re: Repost: getClassLoader() returns null >> >> >>Hi Charlie! >> >>This was also my first thought, but unfortunately this is not >>the case. >>I have just tried the same with a newly written test class, >>which would >>be very unlikely to be available to the bootstrap class loader. >> >>The remarkable thing is, that when I put the class in a jar in >>/common/lib, getClassLoader returns null., whereas putting it in >>/common/classes yields the correct class loader instance. If >>it had been >>loaded by the bootstrap classloader, null would have been returned in >>both cases. By the way, running the JVM with the >>-verbose:class switch >>explicitly shows me that the class is loaded from common/lib (or >>common/classes). >> >>Regards, >>Volker >> >>Cox, Charlie wrote: >> >> >> >>>you don't also have the jar under /jre/lib/ext? It would >>> >>> >>find your jar there >> >> >>>before looking in /common/lib; in which case it would be >>> >>> >>loaded by the jvm's >> >> >>>bootstrap and could return null. >>> >>>see the tomcat classloader doc... >>> >>>Charlie >>> >>> >>> >>> >>> >>>>-----Original Message----- >>>>From: Volker Leidl [mailto:[EMAIL PROTECTED]] >>>>Sent: Thursday, October 03, 2002 12:24 PM >>>>To: Tomcat Users List >>>>Subject: Repost: getClassLoader() returns null >>>> >>>> >>>>Sorry for the repost, I don't mean to bother you, but can >>>>anyone confirm >>>>that getClassLoader() on a class loaded by the common class >>>> >>>> >>loader of >> >> >>>>tomcat (4.0.3), particularily from a jar in common/lib, >>>> >>>> >>returns null? >> >> >>>>I'm really puzzled... >>>> >>>>Thanks in advance, >>>>Volker. >>>> >>>> >>>> >>>> >>>> >>>-- >>>To unsubscribe, e-mail: >>> >>> >><mailto:[EMAIL PROTECTED]> >> >> >>>For additional commands, e-mail: >>> >>> >><mailto:[EMAIL PROTECTED]> >> >> >>> >>> >>> >>> >>-- >>To unsubscribe, e-mail: >><mailto:[EMAIL PROTECTED]> >>For additional commands, e-mail: >><mailto:[EMAIL PROTECTED]> >> >> >> > >-- >To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> >For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
