You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@gump.apache.org by sebb <se...@gmail.com> on 2011/01/09 13:52:32 UTC

Problem locating XPathAPI, but only in test

Strange problem trying to test JMeter:

http://vmgump.apache.org/gump/public/jakarta-jmeter/jakarta-jmeter-test/gump_work/build_jakarta-jmeter_jakarta-jmeter-test.html

The test cannot find the class org/apache/xpath/XPathAPI

Yet the compile works, and the classpath is almost identical (the
differences don't contain xpath jars).

What is even odder, I've scanned all the jars in the build classpath,
and XPathAPI does not appear there either, yet the sources refer to it
and build OK.

Any suggestions?

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org


Re: Problem locating XPathAPI, but only in test

Posted by Stefan Bodewig <bo...@apache.org>.
On 2011-01-18, Stefan Bodewig wrote:

> On 2011-01-13, sebb wrote:

>> How does one add Xalan to the build classpath?  The JMeter project
>> depends on Xalan, but it does not seem to get added to the classpath,
>> only the bootclasspath.

> It should be going into the forked VM's bootclasspath via Ant's
> build.sysclasspath.  If this is not the case then something inside Ant
> has been broken.

Turned out to be true.

> I suspect newer OpenJDKs no longer use the system property
> "sun.boot.class.path" but rather something new without "sun" in its
> name to provide the bootclasspath to the running application.

Turned out to be wrong, even Apple's VM on adam uses this system
property.  I think I've identified the bug in Ant and fixed it, we'll
see in a few hours.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org


Re: Problem locating XPathAPI, but only in test

Posted by Stefan Bodewig <bo...@apache.org>.
On 2011-01-19, sebb wrote:

> I'm beginning to think this may be a Gump bug: although Xalan is
> listed as a normal dependency, it is not added to the classpath, only
> to the bootclasspath.

This is by design.

The type="boot" on the <jar> for Xalan makes the Ant builder do just
that - add Xalan to -Xbootclasspath but not CLASSPATH since it would be
redundant there.  It has to be on the bootclasspath alongside xml-apis
and Xerces so that Ant uses the trunk versions during the build (in
<xslt> tasks for example).

Gump's Ant builder relies on Ant to do the right thing for forked VMs
via the build.sysclasspath magic property but that doesn't (didn't ?)
work as it is supposed to.

If you really wanted a non-bootclasspath version of Xalan you'd have to
define a new project decriptor or add a different <jar> entry without
the type="boot" and a different id.  But I think this is unneeded by
now.

For the Maven builders type="boot" doesn't have any effect, all <jar>s
are treated the same.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org


Re: Problem locating XPathAPI, but only in test

Posted by sebb <se...@gmail.com>.
On 18 January 2011 11:36, sebb <se...@gmail.com> wrote:
> On 18 January 2011 11:20, Stefan Bodewig <bo...@apache.org> wrote:
>> On 2011-01-13, sebb wrote:
>>
>>> On 10 January 2011 20:26, sebb <se...@gmail.com> wrote:
>>>> On 10 January 2011 12:23, Stefan Bodewig <bo...@apache.org> wrote:
>>
>>>>> It likely is part of xalan.jar which is present in -Xbootclaspath but
>>>>> not CLASSPATH.
>>
>>> How does one add Xalan to the build classpath?  The JMeter project
>>> depends on Xalan, but it does not seem to get added to the classpath,
>>> only the bootclasspath.
>>
>> It should be going into the forked VM's bootclasspath via Ant's
>> build.sysclasspath.  If this is not the case then something inside Ant
>> has been broken.
>
> So Xalan is handled differently from other dependencies?
>
>> Right now I don't have the time to follow this through.  I suspect newer
>> OpenJDKs no longer use the system property "sun.boot.class.path" but
>> rather something new without "sun" in its name to provide the
>> bootclasspath to the running application.  If so Ant's
>> Path.systemBootClasspath ends up empty and can't be propagated to the
>> forked VM.  Ant would need to get fixed which in turn should fix the
>> Gump build (likely Forrest's as well) since Gump uses Ant's trunk.
>
> And maybe BSF3 as well...
>
>> I don't know when I'll have the cycles to confirm my suspicion, sorry.
>
> OK, no problem.
>
> I can try adding some debugging to the build file.

Ant is not passing -bootclasspath to the forked <java> task that runs the test.

Adding the Xalan jars to the test run using <work parent="">
references fixes the problem by adding the jars to the test classpath.

However, this is a bit messy, as the paths may perhaps change.

Just tried adding clonevm="true" to the <java> task, but that causes
problems for non-Gump builds.

I'm beginning to think this may be a Gump bug: although Xalan is
listed as a normal dependency, it is not added to the classpath, only
to the bootclasspath.

>> Stefan
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
>> For additional commands, e-mail: general-help@gump.apache.org
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org


Re: Problem locating XPathAPI, but only in test

Posted by sebb <se...@gmail.com>.
On 18 January 2011 11:20, Stefan Bodewig <bo...@apache.org> wrote:
> On 2011-01-13, sebb wrote:
>
>> On 10 January 2011 20:26, sebb <se...@gmail.com> wrote:
>>> On 10 January 2011 12:23, Stefan Bodewig <bo...@apache.org> wrote:
>
>>>> It likely is part of xalan.jar which is present in -Xbootclaspath but
>>>> not CLASSPATH.
>
>> How does one add Xalan to the build classpath?  The JMeter project
>> depends on Xalan, but it does not seem to get added to the classpath,
>> only the bootclasspath.
>
> It should be going into the forked VM's bootclasspath via Ant's
> build.sysclasspath.  If this is not the case then something inside Ant
> has been broken.

So Xalan is handled differently from other dependencies?

> Right now I don't have the time to follow this through.  I suspect newer
> OpenJDKs no longer use the system property "sun.boot.class.path" but
> rather something new without "sun" in its name to provide the
> bootclasspath to the running application.  If so Ant's
> Path.systemBootClasspath ends up empty and can't be propagated to the
> forked VM.  Ant would need to get fixed which in turn should fix the
> Gump build (likely Forrest's as well) since Gump uses Ant's trunk.

And maybe BSF3 as well...

> I don't know when I'll have the cycles to confirm my suspicion, sorry.

OK, no problem.

I can try adding some debugging to the build file.

> Stefan
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
> For additional commands, e-mail: general-help@gump.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org


Re: Problem locating XPathAPI, but only in test

Posted by Stefan Bodewig <bo...@apache.org>.
On 2011-01-13, sebb wrote:

> On 10 January 2011 20:26, sebb <se...@gmail.com> wrote:
>> On 10 January 2011 12:23, Stefan Bodewig <bo...@apache.org> wrote:

>>> It likely is part of xalan.jar which is present in -Xbootclaspath but
>>> not CLASSPATH.

> How does one add Xalan to the build classpath?  The JMeter project
> depends on Xalan, but it does not seem to get added to the classpath,
> only the bootclasspath.

It should be going into the forked VM's bootclasspath via Ant's
build.sysclasspath.  If this is not the case then something inside Ant
has been broken.

Right now I don't have the time to follow this through.  I suspect newer
OpenJDKs no longer use the system property "sun.boot.class.path" but
rather something new without "sun" in its name to provide the
bootclasspath to the running application.  If so Ant's
Path.systemBootClasspath ends up empty and can't be propagated to the
forked VM.  Ant would need to get fixed which in turn should fix the
Gump build (likely Forrest's as well) since Gump uses Ant's trunk.

I don't know when I'll have the cycles to confirm my suspicion, sorry.

Stefan


---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org


Re: Problem locating XPathAPI, but only in test

Posted by sebb <se...@gmail.com>.
On 10 January 2011 20:26, sebb <se...@gmail.com> wrote:
> On 10 January 2011 12:23, Stefan Bodewig <bo...@apache.org> wrote:
>> On 2011-01-09, sebb wrote:
>>
>>> Strange problem trying to test JMeter:
>>
>>> http://vmgump.apache.org/gump/public/jakarta-jmeter/jakarta-jmeter-test/gump_work/build_jakarta-jmeter_jakarta-jmeter-test.html
>>
>>> The test cannot find the class org/apache/xpath/XPathAPI
>>
>>> Yet the compile works, and the classpath is almost identical (the
>>> differences don't contain xpath jars).
>>
>> Your tests are in a forked VM, right?  It looks as if the forked VM
>> wouldn't see the same CLASSPATH as Ant itself.
>>
>>> What is even odder, I've scanned all the jars in the build classpath,
>>> and XPathAPI does not appear there either, yet the sources refer to it
>>> and build OK.
>>
>> It likely is part of xalan.jar which is present in -Xbootclaspath but
>> not CLASSPATH.
>
> Thanks! Yes, that seems to be the case.
>
> Tests work outside Gump because in that case all the dependencies are
> present in the lib/ directory.
>
> I'm not sure why the tests use fork - it appears to have been that way for ages.
> They seem to work OK with fork=no, so I'll try that with Gump.

Actually, they don't work OK - they don't fail, but they don't run any tests ...

It's going to be difficult to rework the tests to not use fork, so I
now need to ensure that the classpath has the appropriate
dependencies.

How does one add Xalan to the build classpath?
The JMeter project depends on Xalan, but it does not seem to get added
to the classpath, only the bootclasspath.

> Thanks again.
>
>> Stefan
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
>> For additional commands, e-mail: general-help@gump.apache.org
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org


Re: Problem locating XPathAPI, but only in test

Posted by sebb <se...@gmail.com>.
On 10 January 2011 12:23, Stefan Bodewig <bo...@apache.org> wrote:
> On 2011-01-09, sebb wrote:
>
>> Strange problem trying to test JMeter:
>
>> http://vmgump.apache.org/gump/public/jakarta-jmeter/jakarta-jmeter-test/gump_work/build_jakarta-jmeter_jakarta-jmeter-test.html
>
>> The test cannot find the class org/apache/xpath/XPathAPI
>
>> Yet the compile works, and the classpath is almost identical (the
>> differences don't contain xpath jars).
>
> Your tests are in a forked VM, right?  It looks as if the forked VM
> wouldn't see the same CLASSPATH as Ant itself.
>
>> What is even odder, I've scanned all the jars in the build classpath,
>> and XPathAPI does not appear there either, yet the sources refer to it
>> and build OK.
>
> It likely is part of xalan.jar which is present in -Xbootclaspath but
> not CLASSPATH.

Thanks! Yes, that seems to be the case.

Tests work outside Gump because in that case all the dependencies are
present in the lib/ directory.

I'm not sure why the tests use fork - it appears to have been that way for ages.
They seem to work OK with fork=no, so I'll try that with Gump.

Thanks again.

> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
> For additional commands, e-mail: general-help@gump.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org


Re: Problem locating XPathAPI, but only in test

Posted by Stefan Bodewig <bo...@apache.org>.
On 2011-01-09, sebb wrote:

> Strange problem trying to test JMeter:

> http://vmgump.apache.org/gump/public/jakarta-jmeter/jakarta-jmeter-test/gump_work/build_jakarta-jmeter_jakarta-jmeter-test.html

> The test cannot find the class org/apache/xpath/XPathAPI

> Yet the compile works, and the classpath is almost identical (the
> differences don't contain xpath jars).

Your tests are in a forked VM, right?  It looks as if the forked VM
wouldn't see the same CLASSPATH as Ant itself.

> What is even odder, I've scanned all the jars in the build classpath,
> and XPathAPI does not appear there either, yet the sources refer to it
> and build OK.

It likely is part of xalan.jar which is present in -Xbootclaspath but
not CLASSPATH.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org