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: Mon, 24 May 2010 17:31:04 -0400



On 5/24/10 6:15 AM, Yang Xiang wrote:
>
>
> Actually I got a new problem with CastException because I have several
> webapps with the same classes of mine within one Tomcat.


ClassCastExceptions can occur for similar reasons, when you have
multiple classloaders in a hierarchy. If an object was loaded in one
Classloader, and you try and cast it to nominally the same Class, where
the Class in the cast was loaded in a different Classloader, you'll get
that exception. In other words, the nominally "same" Class loaded by 2
different Classloaders will not be equivalent Classes - they are
essentially "scoped" by the Classloader that loaded them.



> Thus, I'll try
> to put my SAMLObjects to the common lib folder of Tomcat instead of your
> suggestion to put the OpenSAML library to my web application folder,
> because I have to run serveral applications within the same Tomcat as
> mentioned above.


That should work ok, to resolve the original issue (although personally
I would put in your webapp - making your app dependent on things not in
your war archive means you have undocumented dependencies to keep track
of and manage). Just be aware of tricky issues like the above one re:
casting, if a given Class somehow gets loaded by more than one Classloader.



Archive powered by MHonArc 2.6.16.

Top of Page