Bug 144742 - Setting the bootclasspath for some VMs fails the evaluation tests
Summary: Setting the bootclasspath for some VMs fails the evaluation tests
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3 M6   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-31 14:37 EDT by Olivier Thomann CLA
Modified: 2007-03-21 10:09 EDT (History)
1 user (show)

See Also:


Attachments
Proposed fix (1.05 KB, patch)
2006-05-31 14:38 EDT, Olivier Thomann CLA
no flags Details | Diff
Proposed fix (9.24 KB, patch)
2006-06-02 17:02 EDT, Olivier Thomann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2006-05-31 14:37:07 EDT
Reading the JRockit forum, I realize that when we set the bootclasspath in the StandardVMRunner we might get failures in the evaluation tests.
We might want to set only the classpath of the VM instead of the classpath and the bootclasspath.
I will attach a patch.
Comment 1 Olivier Thomann CLA 2006-05-31 14:38:01 EDT
Created attachment 43142 [details]
Proposed fix

With this patch the tests are still ok with standard VMS like Sun or IBM.
Comment 2 Olivier Thomann CLA 2006-05-31 22:20:12 EDT
I confirm that JRockit can fail some evaluation tests without this fix.
Jerome, please double-check the patch. I would suggest it for 3.2.1.
Comment 3 Philipe Mulet CLA 2006-06-01 03:02:55 EDT
If the fix is good, I would fix it for 3.2, so JRockit can qualify in time.
Comment 4 Jerome Lanneluc CLA 2006-06-01 05:41:58 EDT
This needs a comment with at least a reference to this bug explaining why the bootClasspath() is put on the regular classpath().

Also has this change been tested on Mac and Linux ?
Comment 5 Olivier Thomann CLA 2006-06-01 10:07:05 EDT
So far I tested it on Windows. I can run the test on Linux, but it is more difficult to run the tests on Mac.
Comment 6 Olivier Thomann CLA 2006-06-01 10:21:46 EDT
If you prefer I can make this change only for JRockit by defining a new VM launcher.
Comment 7 Olivier Thomann CLA 2006-06-01 10:23:21 EDT
On Mac the VM launcher used is not a StandardVMLauncher. It is a MacVMLauncher. So this change has no impact on Mac.
Comment 8 Jerome Lanneluc CLA 2006-06-01 10:52:24 EDT
(In reply to comment #7)
> On Mac the VM launcher used is not a StandardVMLauncher. It is a MacVMLauncher.
> So this change has no impact on Mac.
> 
And there is no JRockit on Mac ?
Comment 9 Olivier Thomann CLA 2006-06-01 11:10:07 EDT
No, not yet.
Linux and Windows only so far.
Comment 10 Olivier Thomann CLA 2006-06-01 11:42:18 EDT
The debug evaluation tests and all evaluation tests are disabled on Linux. So this leaves only Windows as the tested platform.
And the patch works fine on Windows. We could however differ it to 3.2.1 since they have not been reported as problems.
I got failures running the EvaluationTests which are private tests for now.
Comment 11 Olivier Thomann CLA 2006-06-01 11:42:34 EDT
The debug evaluation tests and all evaluation tests are disabled on Linux. So this leaves only Windows as the tested platform.
And the patch works fine on Windows. We could however differ it to 3.2.1 since they have not been reported as problems.
I got failures running the EvaluationTests which are private tests for now.
Comment 12 Olivier Thomann CLA 2006-06-02 16:07:27 EDT
I confirm that not fixing this is causing grief to the tests in the package org.eclipse.jdt.core.tests.eval.
I suggest to add a new VM launcher for JRockit VM that would not set the bootclasspath but instead set the classpath only. This would not impact the existing Sun VMs and would allow JRockit to pass these tests.
Comment 13 Olivier Thomann CLA 2006-06-02 16:22:15 EDT
This doesn't seem to be enough.
Now I get:
java.lang.SecurityException: Prohibited package name: java.util.zip

I'll investigate what can be causing this error.
Comment 14 Olivier Thomann CLA 2006-06-02 16:58:06 EDT
Ok, the failures I got seems to come from the usage of the java.util.zip package as a context for some evaluation test.
JRockit VM doesn't like this and issue a SecurityException.
Two tests are concerned by this:
org.eclipse.jdt.core.tests.eval.CodeSnippetTest.testPackage
and:
org.eclipse.jdt.core.tests.eval.NegativeCodeSnippetTest.testChangePackage.

See http://forums.bea.com/bea/thread.jspa?forumID=2037&threadID=600008522&messageID=600017934#600017934 on the bea forums. I don't understand the rational behind this error.

We might simply want to exclude these two tests when running them with JRockit for now.
Comment 15 Olivier Thomann CLA 2006-06-02 17:02:59 EDT
Created attachment 43393 [details]
Proposed fix

This patch adds a new VM launcher for JRockit VMs. It also disables the two tests mentionned before when the running VM is JRockit.
Comment 16 Olivier Thomann CLA 2007-02-09 09:51:15 EST
Released for 3.3M6.
Comment 17 David Audel CLA 2007-03-21 10:09:26 EDT
Verified for 3.3 M6 using build I20070321-0010