Skip to Content.
Sympa Menu

mace-opensaml-users - Re: [OpenSAML] XMLConfigirator: Bug respecting JDK 1.6?

Subject: OpenSAML user discussion

List archive

Re: [OpenSAML] XMLConfigirator: Bug respecting JDK 1.6?


Chronological Thread 
  • From: Brent Putman <>
  • To:
  • Subject: Re: [OpenSAML] XMLConfigirator: Bug respecting JDK 1.6?
  • Date: Fri, 21 May 2010 15:22:46 -0400



On 5/21/2010 6:45 AM, Yang Xiang wrote:
> I wrote an extension to the XMLConfigurator by overwritng the method
> createClassInstance and replacing the line:
>
> Class clazz = classLoader.loadClass(className);
>
> with
>
> Class clazz = Class.forName(className, false, classLoader);
>
> Now it works fine with tomcat too.
>
>


And that almost certainly means that this is an issue with Tomcat's
hierarchial classloader. You don't say which Classloader you are using
as the classLoader in the call to Class.forName there, but if it's
either your configurator class's classloader
(this.getClass().getClassloader() ) or the current Thread context
classloader (which I believe in a webapp would be the same classloader),
then that would explain it. The classloader looks first to itself and
then delegates to its parent, and since your XMLObject code is probably
in your webapp, then it finds it.



Archive powered by MHonArc 2.6.16.

Top of Page