Community
Participate
Working Groups
20040407, 1.5 jdt.core + jdt.ui with preference page fix 1. started with new workspace 2. changed source compliance to 1.5 3. created a new java project. java.lang.NullPointerException at java.lang.Throwable.<init>(Throwable.java) at java.lang.Throwable.<init>(Throwable.java:73) at java.lang.NullPointerException.<init>(NullPointerException.java:60) at org.eclipse.jdt.core.JavaCore.setOptions(JavaCore.java:3569) at org.eclipse.jdt.internal.launching.LaunchingPlugin.startup(LaunchingPlugin.java:390) at org.eclipse.core.internal.compatibility.PluginActivator.start(PluginActivator.java:49) at org.eclipse.osgi.framework.internal.core.BundleContext$1.run(BundleContext.java:992) at java.security.AccessController.doPrivileged(AccessController.java:189) at org.eclipse.osgi.framework.internal.core.BundleContext.startActivator(BundleContext.java:988) at org.eclipse.osgi.framework.internal.core.BundleContext.start(BundleContext.java:971) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:413) at org.eclipse.osgi.framework.internal.core.Bundle.start(Bundle.java:307) at org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLocalClass(EclipseClassLoader.java) at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java) at org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader.loadClass(AbstractClassLoader.java) at java.lang.ClassLoader.loadClass(ClassLoader.java) at org.eclipse.osgi.framework.internal.core.BundleLoader.loadClass(BundleLoader.java:306) at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:341) at org.eclipse.osgi.framework.internal.core.Bundle.loadClass(Bundle.java:1293) at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:1 32) at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:1 25) at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:1 14) at org.eclipse.jdt.core.JavaCore.getClasspathContainerInitializer(JavaCore.java:1253) at org.eclipse.jdt.core.JavaCore.getClasspathContainer(JavaCore.java:1173) at org.eclipse.jdt.internal.ui.wizards.buildpaths.CPListElement.createFromExisting(CPListElement.java:290) at org.eclipse.jdt.internal.ui.wizards.buildpaths.BuildPathsBlock.getExistingEntries(BuildPathsBlock.java:371) at org.eclipse.jdt.internal.ui.wizards.buildpaths.BuildPathsBlock.init(BuildPathsBlock.java:306) at org.eclipse.jdt.ui.wizards.JavaCapabilityConfigurationPage.init(JavaCapabilityConfigurationPage.java:105) at org.eclipse.jdt.internal.ui.wizards.JavaProjectWizardSecondPage.updateProject(JavaProjectWizardSecondPage.jav a:168) at org.eclipse.jdt.internal.ui.wizards.JavaProjectWizardSecondPage.performFinish(JavaProjectWizardSecondPage.jav a:183) at org.eclipse.jdt.internal.ui.wizards.JavaProjectWizard.finishPage(JavaProjectWizard.java:56) at org.eclipse.jdt.internal.ui.wizards.NewElementWizard$2.run(NewElementWizard.java:103) at org.eclipse.jdt.internal.core.BatchOperation.executeOperation(BatchOperation.java:34) at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:700) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1559) at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:3324) at org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:56) at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:302) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:252) at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:756) at org.eclipse.jdt.internal.ui.wizards.NewElementWizard.performFinish(NewElementWizard.java:110) at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:606) at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:319) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:413) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java) at org.eclipse.jface.window.Window.runEventLoop(Window.java) at org.eclipse.jface.window.Window.open(Window.java:650) at org.eclipse.ui.actions.NewProjectAction.run(NewProjectAction.java:109) at org.eclipse.jface.action.Action.runWithEvent(Action.java:881) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:550) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:502) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:435) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1561) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1532) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:257) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:140) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:90) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:279) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:241) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:117) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:41) at java.lang.reflect.Method.invoke(Method.java:386) at org.eclipse.core.launcher.Main.basicRun(Main.java:267) at org.eclipse.core.launcher.Main.run(Main.java:692) at org.eclipse.core.launcher.Main.main(Main.java:676)
Offending line is: Preferences preferences = getPlugin().getPluginPreferences(); Curiously, when following execution path, launching plugin did reach JDT Core (getOptions call) prior to invoking #setOption. But since we have two jdt.core plugins in the install (one patching the other), there must be some confusion at the platform level, where the obsolete plugin gets in the way.
The proof the obsolete plugin is running there is that the line number (3569) corresponds to the offending line in HEAD stream (which corresponds to official 3.0 JDT Core), where it doesn't match the same method in our 1.5 JDT Core patch... looks like the 2 versions of JDT Core are being runned together...
This is a major bug for us, as it is preventing to use an update site to expose our 1.5 preview.
let me complete the steps: 1. start empty workspace with build 'I20040406 + jdt.ui fix for pref page' (should be equal to I20040407) 2. go to the jdt.core update site 'http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/jdt-core-home/update- site' and update to the 1.5 plugin 3. change to 1.5 on the compiler pref page 4. create a new Java project
*** Bug 57716 has been marked as a duplicate of this bug. ***
This reminds me that I noticed (yesterday) that when looking into the plugin details (about Eclipse menu), there were 2 occurrences of jdt.core plugins. Likely another symptom of the confusion.
After trying 3 more times, I wasn't able to reproduce this anymore...
There were various problems with adding in the JDT core cheetah plugin (which I assume is what is going on here). These have been addressed. The last comment also indicates that the problem has not been seen lately. Closing as fixed.