Bug 3077 - Unable to shutdown and restart the platform (1GG1LD8)
Summary: Unable to shutdown and restart the platform (1GG1LD8)
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 2.0   Edit
Hardware: All Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Jeff McAffer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-10 22:49 EDT by Debbie Wilson CLA
Modified: 2002-01-03 13:04 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Debbie Wilson CLA 2001-10-10 22:49:03 EDT
I have a group of tests which require the platform to be started before each test.  For
	example:

	String[] testNames = { "test1", "test2", {test3");

	for (int i = 0; i < testNames.length; i++) {
		...
		new Main().run (<argument list including "-application " + testNames[i]>);
	}

	This fails when trying to start up the second run (for test2) with the following:
java.lang.Error: factory already defined
	at java.net.URL.setURLStreamHandlerFactory(URL.java:880)
	at org.eclipse.core.internal.boot.PlatformURLHandlerFactory.startup(PlatformURLHandlerFactory.java:52)
	at org.eclipse.core.internal.boot.InternalBootLoader.initialize(InternalBootLoader.java:552)
	at org.eclipse.core.internal.boot.InternalBootLoader.startup(InternalBootLoader.java:912)
	at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:808)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:119)
	at org.eclipse.core.launcher.Main.run(Main.java:466)
	at org.eclipse.core.tests.harness.launcher.Main.run(Main.java:195)
	at org.eclipse.core.tests.internal.plugins.AllPluginRuntimeTests.main(AllPluginRuntimeTests.java:48)
Exception in thread "main" 

NOTES:
Comment 1 DJ Houghton CLA 2001-10-24 06:43:23 EDT
PRODUCT VERSION:
	R0.9

Comment 2 John Arthorne CLA 2002-01-03 13:04:56 EST
The solution is to launch each invocation of the platform in a separate VM.  I 
have created a simple framework for doing this.  See the new classes 
SessionTestLauncher, WorkspaceSessionTest, and RunNewSessionTests in the 
ZZDJTest project.  See me for more details...