Bug 31576 2.1M5 NullPointerException in ClassPathDetector.detectOutputFolder
I'm attempting to create a new Java Project and point it to a directory in my ClearCase directory. It appears that in an attempt to discover source directories and libraries, a NullPointerException is being thrown. This is in version 2.1 M5. The relevant information from the log is: !SESSION Feb 11, 2003 12:35:23.406 --------------------------------------------- java.version=1.4.1_01 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Command-line arguments: -os win32 -ws win32 -arch x86 -data c:\source\eclipse-workspace -install file:C:/software/eclipse/ !ENTRY com.rational.clearcase 1 0 Feb 11, 2003 12:35:23.406 !MESSAGE traceLevel = 2(option=null) !ENTRY org.eclipse.jdt.ui 4 10001 Feb 11, 2003 12:44:56.854 !MESSAGE Internal Error !STACK 0 java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:716) at org.eclipse.jdt.internal.ui.wizards.NewElementWizard.performFinish(NewElementWizard.java:86) at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:570) at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:308) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1692) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1410) at org.eclipse.jface.window.Window.runEventLoop(Window.java:561) at org.eclipse.jface.window.Window.open(Window.java:541) at org.eclipse.ui.actions.NewProjectAction.run(NewProjectAction.java:97) at org.eclipse.jface.action.Action.runWithEvent(Action.java:804) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:450) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent(ActionContributionItem.java:398) at org.eclipse.jface.action.ActionContributionItem.access$0(ActionContributionItem.java:392) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent(ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1692) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1410) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1289) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1272) at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) 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:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: java.lang.NullPointerException at org.eclipse.jdt.internal.ui.wizards.ClassPathDetector.detectOutputFolder(ClassPathDetector.java:122) at org.eclipse.jdt.internal.ui.wizards.ClassPathDetector.detectClasspath(ClassPathDetector.java:77) at org.eclipse.jdt.internal.ui.wizards.ClassPathDetector.<init>(ClassPathDetector.java:56) at org.eclipse.jdt.internal.ui.wizards.NewProjectCreationWizardPage.updateProject(NewProjectCreationWizardPage.java:109) at org.eclipse.jdt.internal.ui.wizards.NewProjectCreationWizardPage.performFinish(NewProjectCreationWizardPage.java:129) at org.eclipse.jdt.internal.ui.wizards.NewProjectCreationWizard.finishPage(NewProjectCreationWizard.java:56) at org.eclipse.jdt.internal.ui.wizards.NewElementWizard$2.run(NewElementWizard.java:79) at org.eclipse.jdt.internal.core.BatchOperation.executeOperation(BatchOperation.java:34) at org.eclipse.jdt.internal.core.JavaModelOperation.execute(JavaModelOperation.java:343) at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:671) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1588) at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:2633) at org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:32) at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:296) ... 34 more
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/ClassPathDetector.java
}
	/* (non-Javadoc)
	 * @see org.eclipse.core.resources.IResourceProxyVisitor#visit(org.eclipse.core.resources.IResourceProxy)
	 */
	public boolean visit(IResourceProxy proxy) throws CoreException {
		if (proxy.getType() == IResource.FILE) {
			String name= proxy.getName();
			String extension= Signature.getSimpleName(name);
			if ("java".equalsIgnoreCase(extension)) { 
				visitCompilationUnit((IFile) proxy.requestResource());
			} else if ("class".equalsIgnoreCase(extension)) { 
				fClassFiles.add((IFile) proxy.requestResource());
			} else if ("jar".equalsIgnoreCase(extension)) { 
				fJARFiles.add(proxy.requestFullPath());
			}
			return false;
		}
		return true;
	}
		
	public IPath getOutputLocation() {
		return fResultOutputFolder;
	}
		
	public IClasspathEntry[] getClasspath() {
		return fResultClasspath;
	}
}