Bug 21680 - NullPointerException in trying to run a test
Summary: NullPointerException in trying to run a test
Status: RESOLVED DUPLICATE of bug 21170
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 2.0   Edit
Hardware: PC Linux
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: Darin Swanson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-07-18 05:55 EDT by Udo Klinkmüller CLA
Modified: 2002-07-18 11:30 EDT (History)
1 user (show)

See Also:


Attachments
the Eclipse log file (21.59 KB, text/plain)
2002-07-18 06:01 EDT, Udo Klinkmüller CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Udo Klinkmüller CLA 2002-07-18 05:55:21 EDT
After I corrected some classpath variables (see my bug report before) in the
Window->Preferences->Java->Classpath Variables I'm not able to start a test
using "Run". Also I'm not able to configure any starts in the Run->Run...
dialog. In the Eclipse log file following exception is reported:

!SESSION Jul 18, 2002 11:46:22.731 ---------------------------------------------
java.version=1.4.0
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86, WS=motif, NL=de_DE
Command-line arguments: -os linux -ws motif -arch x86 -data
/home/udo/eclipse_prj -install file:/opt/eclipse/
!ENTRY org.eclipse.ui 4 4 Jul 18, 2002 11:46:22.732
!MESSAGE Unhandled exception caught in event loop.
!ENTRY org.eclipse.ui 4 0 Jul 18, 2002 11:46:22.733
!MESSAGE java.lang.NullPointerException
!STACK 0
java.lang.NullPointerException
	at
org.eclipse.jdt.internal.launching.RuntimeClasspathEntry.<init>(RuntimeClasspathEntry.java:168)
	at
org.eclipse.jdt.launching.JavaRuntime.newRuntimeClasspathEntry(JavaRuntime.java:504)
	at
org.eclipse.jdt.launching.StandardClasspathProvider.recoverRuntimePath(StandardClasspathProvider.java:96)
	at
org.eclipse.jdt.launching.StandardClasspathProvider.computeUnresolvedClasspath(StandardClasspathProvider.java:61)
	at
org.eclipse.jdt.launching.JavaRuntime.computeUnresolvedRuntimeClasspath(JavaRuntime.java:763)
	at
org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate.getClasspath(AbstractJavaLaunchConfigurationDelegate.java:217)
	at
org.eclipse.jdt.internal.launching.JavaLocalApplicationLaunchConfigurationDelegate.launch(JavaLocalApplicationLaunchConfigurationDelegate.java:73)
	at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:136)
	at
org.eclipse.debug.internal.ui.actions.RelaunchActionDelegate.relaunch(RelaunchActionDelegate.java:56)
	at
org.eclipse.debug.internal.ui.actions.RelaunchActionDelegate.relaunch(RelaunchActionDelegate.java:32)
	at
org.eclipse.debug.internal.ui.actions.RelaunchHistoryLaunchAction$1.run(RelaunchHistoryLaunchAction.java:59)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:66)
	at
org.eclipse.debug.internal.ui.actions.RelaunchHistoryLaunchAction.run(RelaunchHistoryLaunchAction.java:57)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:749)
	at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:407)
	at
org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent(ActionContributionItem.java:361)
	at
org.eclipse.jface.action.ActionContributionItem.access$0(ActionContributionItem.java:352)
	at
org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent(ActionContributionItem.java:47)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:846)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1683)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1506)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1177)
	at org.eclipse.ui.internal.Workbench.run(Workbench.java:1160)
	at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:775)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:248)
	at org.eclipse.core.launcher.Main.run(Main.java:698)
	at org.eclipse.core.launcher.Main.main(Main.java:534)
Comment 1 Philipe Mulet CLA 2002-07-18 06:00:50 EDT
The runtime path belongs to JDT/Debug.
Comment 2 Udo Klinkmüller CLA 2002-07-18 06:01:07 EDT
Created attachment 1709 [details]
the Eclipse log file
Comment 3 Darin Wright CLA 2002-07-18 09:22:38 EDT
Looking at the code, it looks like you have added a jar to the classpath in a 
project that is not located under the workspace root? (i.e. an external 
project?). Is this correct?
Comment 4 Darin Wright CLA 2002-07-18 09:26:29 EDT
Darin (S): I notice that we now have a null pointer check in out latest code, 
but does this work for jars in external projects?

case ARCHIVE :
	path = root.getAttribute("externalArchive"); //$NON-NLS-1$
	if (isEmpty(path)) {
		// internal
		path = root.getAttribute("internalArchive"); //$NON-NLS-1$
		if (isEmpty(path)) {
			abort(LaunchingMessages.getString
("RuntimeClasspathEntry.Unable_to_recover_runtime_class_path_entry_-
_missing_archive_path_5"), null); //$NON-NLS-1$
		} else {
		IResource res = ResourcesPlugin.getWorkspace().getRoot
().findMember(new Path(path));
			if (res == null) {
				abort(LaunchingMessages.getString
("RuntimeClasspathEntry.Internal_archive_no_longer_exists___1") + path, 
null); //$NON-NLS-1$
			}
			setClasspathEntry(JavaCore.newLibraryEntry
(res.getFullPath(), sourcePath, rootPath));
		}
	} else {
		// external
		setClasspathEntry(JavaCore.newLibraryEntry(new Path(path), 
sourcePath, rootPath));
	}
	break;
Comment 5 Darin Swanson CLA 2002-07-18 11:30:27 EDT
I believe this to be a duplicate of bug 21170.

I could not cause any problems using external projects with internal jars on a 
non default classpath of a launch configuration.

*** This bug has been marked as a duplicate of 21170 ***