Bug 218064 - NPE attempting to create a Java project out of JavaProjectWizardFirstPage
Summary: NPE attempting to create a Java project out of JavaProjectWizardFirstPage
Status: VERIFIED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M6   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-06 14:35 EST by Darin Swanson CLA
Modified: 2008-03-25 08:37 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Swanson CLA 2008-02-06 14:35:38 EST
From https://jazz.net/jazz/resource/itemName/WorkItem/43185

Session Data:
eclipse.buildId=I20071214-0415
java.version=1.5.0_13
java.vendor=Apple Inc.
BootLoader constants: OS=macosx, ARCH=x86, WS=carbon, NL=en_US
Framework arguments:  -keyring /Users/kim/.eclipse_keyring -showlocation
Command-line arguments:  -os macosx -ws carbon -arch x86 -keyring /Users/kim/.eclipse_keyring -consoleLog -showlocation
This is a continuation of log file /Users/kim/workspace/.metadata/.bak_0.log
Created Time: 2008-02-01 11:08:45.026


When trying to create a normal Java Project or a general Project, I get an "Unhandled event loop exception" message. Creating a Plugin-Project is no problem.
The error only occurs under Mac OS X or Linux. In Windows XP it works fine. 

Stack Trace:
java.lang.NullPointerException
	at org.eclipse.jdt.internal.ui.wizards.JavaProjectWizardFirstPage$DetectGroup.handlePossibleJVMChange(JavaProjectWizardFirstPage.java:796)
	at org.eclipse.jdt.internal.ui.wizards.JavaProjectWizardFirstPage$DetectGroup.<init>(JavaProjectWizardFirstPage.java:759)
	at org.eclipse.jdt.internal.ui.wizards.JavaProjectWizardFirstPage.createControl(JavaProjectWizardFirstPage.java:1032)
	at org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.java:170)
	at org.eclipse.jface.wizard.WizardDialog.createPageControls(WizardDialog.java:669)
	at org.eclipse.jface.wizard.WizardDialog.createContents(WizardDialog.java:543)
	at org.eclipse.jface.window.Window.create(Window.java:426)
	at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1081)
	at org.eclipse.ui.internal.actions.NewWizardShortcutAction.run(NewWizardShortcutAction.java:122)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1495)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1519)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1504)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1295)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2952)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
	at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
	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:585)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
Comment 1 Martin Aeschlimann CLA 2008-02-07 04:44:22 EST
This stacktrace can only happen when

selectedCompliance= JavaCore.getOption(JavaCore.COMPILER_COMPLIANCE);

returns null.

This should never happen and would be a problem in JDT/Core.

I just tried on the Mac with 3.3.2 that creating a Java projects works.

Maybe this has to do which JRE's are found. Could it be that the JRE detecter succeeds to write 'null' to JavaCore.COMPILER_COMPLIANCE ?
Or did you import preferences before you did this?

What does the 'Java > Compiler' preference show as configured compliance?



Comment 2 Jerome Lanneluc CLA 2008-02-26 09:28:53 EST
According to the Jazz bug, Kim Herzig cannot reproduce this bug any longer.
Looking at the code, I don't see how this can happen.

Marking as WORKSFORME.
Comment 3 David Audel CLA 2008-03-25 08:37:55 EDT
Verified for 3.4M6.