RFR [9] 8047674: java/net/URLPermission/nstest/lookup.sh NoClassDefFoundError when run in concurrent mode
Chris Hegarty
chris.hegarty at oracle.com
Mon Jun 23 12:44:57 UTC 2014
On 23/06/14 11:55, Alan Bateman wrote:
> On 23/06/2014 11:51, Chris Hegarty wrote:
>> This test has been seen to fail occasionally when run with concurrency
>> enabled. I believe the reason to be two fold:
> I don't know if the order matter here because the @build should compile
> all of jdk.testlibrary.*. However, I think it's worth trying and so the
> changes look good to me.
Yes, it does compile all of jdk.testlibrary.*, but the order determines
where the classes end up.
If the testlibrary classes are compiled implicitly during the
compilation of the test classes, then the testlibrary classes end up in
TESTCLASSES. And the test succeeds.
If the testlibrary is already compiled (by another test), then the
@build does nothing, and the test classes are compiled into TESTCLASSES.
The test invokes the java launcher directly passing TESTCLASSES to -cp.
This fails because TESTCLASSES does not contain the testlibrary classes.
With the second part of the suggested change, replace TESTCLASSES with
TESTCLASSPATH, the order of the tags does not have any impact on whether
the test passes or fails. But without fixing the order you can end up
needlessly compiling the testlibrary classes into TESTCLASSES.
-Chris.
>
> -Alan.
More information about the net-dev
mailing list