Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 330598

Summary: NPE when empty manifest entry is added in the 'Manifest Entries' tab of the 'Deployment Assembly' page
Product: [WebTools] WTP Common Tools Reporter: Aidyl Kareh <amkareh>
Component: wst.commonAssignee: Aidyl Kareh <amkareh>
Status: RESOLVED FIXED QA Contact: Carl Anderson <ccc>
Severity: normal    
Priority: P3 CC: amkareh, jsholl, stryker
Version: unspecifiedFlags: ccc: review+
Target Milestone: 3.2.3   
Hardware: PC   
OS: Windows Vista   
Whiteboard:
Attachments:
Description Flags
Proposed Patch none

Description Aidyl Kareh CLA 2010-11-18 14:07:21 EST
Build Identifier: WTP 3.2.3

java.lang.NullPointerException
	at org.eclipse.core.runtime.Path.append(Path.java:261)
	at org.eclipse.jst.common.ui.internal.assembly.wizard.ManifestModuleDependencyControl.performOk(ManifestModuleDependencyControl.java:488)
	at org.eclipse.wst.common.componentcore.ui.propertypage.ModuleAssemblyRootPage.performOk(ModuleAssemblyRootPage.java:74)
	at org.eclipse.jface.preference.PreferenceDialog$13.run(PreferenceDialog.java:964)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
	at org.eclipse.jface.preference.PreferenceDialog.okPressed(PreferenceDialog.java:944)
	at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.okPressed(FilteredPreferenceDialog.java:447)
	at org.eclipse.jface.preference.PreferenceDialog.buttonPressed(PreferenceDialog.java:233)
	at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
	at org.eclipse.jface.window.Window.open(Window.java:801)
	at org.eclipse.ui.dialogs.PropertyDialogAction.run(PropertyDialogAction.java:157)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1407)


Reproducible: Always

Steps to Reproduce:
1. Create an EAR 5 project with all default modules
2. Open the 'Deployment Assembly' properties page of the EJB project and go to the 'Manifest Entries' tab.
3. Click on 'Add...' 
4. In the 'Add Manifest Entries' dialog, click on 'Add Custom Entry'. (This will add an empty entry).
5. Select the empty entry that was added, and click Finish.
6. Click 'OK' to close the 'Deployment Assembly' properties page and accept the changes. (The NPE is thrown)
Comment 1 Aidyl Kareh CLA 2010-11-18 14:13:38 EST
Created attachment 183412 [details]
Proposed Patch

This patch adds code so that the 'Add Custom Entry' button in the 'Add Manifest Entries' dialog is disabled when the field is empty.
Comment 2 Rob Stryker CLA 2010-11-19 03:45:56 EST
This patch looks good to me... I like it
Comment 3 Jason Sholl CLA 2010-11-19 08:53:49 EST
Code checked into 32M and HEAD for WTP 3.2.3 and 3.3