shibboleth-dev - Re: class loading order
Subject: Shibboleth Developers
List archive
- From: Chad La Joie <>
- To:
- Subject: Re: class loading order
- Date: Thu, 25 Aug 2005 14:14:11 -0400
- Organization: UIS - Project Sentinel
Tom Scavo wrote:
On 8/22/05, Chad La Joie
<>
wrote:
So, are you seeing an error where your unit test isn't picking up the
latest changed to your code?
Yes, I can reproduce the following bug:
1) Refactor an extension source file by changing its name.
2) Reinstall the extension. A unit test that (indirectly) depends on
this refactored source file will fail since the old class files are in
the extension JAR and the JARs appear in the test classpath *before*
the unpacked class files.
When you say "reinstall" what do you mean? Just that you run through the entire install process in order to do the unit test? (If so, just as a speed-up, you can just run "ant compile".)
Also, if you changed the file name (and thus change the class name) why is the test even looking for the old class? Am I misunderstanding what you're doing?
3) Manually delete the extension JARs in custom/lib and
custom/$EXTENSION_NAME$/dist and reinstall. The unit test will still
fail since the JAR file in $IDP_HOME$/lib takes precedence.
No, it doesn't. $IDP_HOME$/lib isn't on the classpath for unit tests.
4) Turn off extension testing, reinstall, turn on extension testing,
and reinstall. This time the unit test will not fail since all the
JARs will have been rebuilt by the first successful reinstall.
There are two ways of looking at this. Either the order of operations
is faulty (unit testing occurs before JAR creation) or the classpath
order is incorrect (JARs are searched before class files). I think
the latter is the root source of the problem.
Tom
One thing I do agree is a bug, and I'll fix this now, is that the build.path in the main build file tries to include some stuff from custom/, which it shouldn't. Now that I notice it I think you mentioned that in a note some ways back in this thread.
--
Chad La Joie 315Q St. Mary's Hall
Project Sentinel 202.687.0124
- Re: class loading order, (continued)
- Re: class loading order, Tom Scavo, 08/22/2005
- Re: class loading order, Tom Scavo, 08/22/2005
- Re: class loading order, Chad La Joie, 08/22/2005
- Re: class loading order, Tom Scavo, 08/22/2005
- Re: class loading order, Tom Scavo, 08/22/2005
- Re: class loading order, Chad La Joie, 08/22/2005
- Re: class loading order, Tom Scavo, 08/22/2005
- Re: class loading order, Chad La Joie, 08/22/2005
- Re: class loading order, Tom Scavo, 08/22/2005
- Re: class loading order, Chad La Joie, 08/22/2005
- Re: class loading order, Tom Scavo, 08/25/2005
- Re: class loading order, Chad La Joie, 08/25/2005
- Re: class loading order, Tom Scavo, 08/25/2005
- Re: class loading order, Chad La Joie, 08/25/2005
- Re: class loading order, Tom Scavo, 08/25/2005
- Re: class loading order, Chad La Joie, 08/25/2005
- Re: class loading order, Tom Scavo, 08/25/2005
- Re: class loading order, Tom Scavo, 08/22/2005
Archive powered by MHonArc 2.6.16.