Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 145140 - New Servlet Wizard Fails
Summary: New Servlet Wizard Fails
Status: CLOSED DUPLICATE of bug 143229
Alias: None
Product: WTP Java EE Tools
Classification: WebTools
Component: jst.servlet (show other bugs)
Version: 1.5   Edit
Hardware: PC Windows XP
: P2 major (vote)
Target Milestone: ---   Edit
Assignee: jst.servlet CLA
QA Contact: John Lanuti CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-02 15:26 EDT by Arthur Ryman CLA
Modified: 2006-09-26 10:08 EDT (History)
0 users

See Also:


Attachments
.log file showing Add Servlet failure (20.66 KB, text/plain)
2006-06-02 15:38 EDT, Arthur Ryman CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arthur Ryman CLA 2006-06-02 15:26:31 EDT
 
Comment 1 Arthur Ryman CLA 2006-06-02 15:30:20 EDT
I created a Dynamic Web project, added an HTML, JSP, and Web service. That all worked correctly. I closed the workspace, reopened it a day later and tried to add a new servlet using the wizard. I selected the doGet method only. The wizard did a little work, then failed with the following exception:

Dialog box: 

An error has occurred when Create Servlet finished.

Details:

org.eclipse.core.runtime.CoreException: Extended Operation failure: org.eclipse.jst.j2ee.internal.web.operations.AddServletOperation
	at org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizard.performFinish(DataModelWizard.java:172)
	at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:680)
	at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:355)
	at org.eclipse.jface.dialogs.Dialog$3.widgetSelected(Dialog.java:660)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java(Compiled Code))
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java(Compiled Code))
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Inlined Compiled Code))
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java(Compiled Code))
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java(Compiled Code))
	at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code))
	at org.eclipse.jface.window.Window.open(Window.java:796)
	at org.eclipse.ui.internal.navigator.wizards.WizardShortcutAction.run(WizardShortcutAction.java:94)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:499)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:539)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:400)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java(Compiled Code))
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Inlined Compiled Code))
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java(Compiled Code))
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java(Compiled Code))
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java(Compiled Code))
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
	at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
	at java.lang.reflect.Method.invoke(Method.java:391)
	at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
	at org.eclipse.core.launcher.Main.run(Main.java:977)
	at org.eclipse.core.launcher.Main.main(Main.java:952)
org.eclipse.core.runtime.CoreException[0]: java.lang.NullPointerException
	at org.eclipse.jst.j2ee.internal.web.operations.AddServletOperation.createServlet(AddServletOperation.java:223)
	at org.eclipse.jst.j2ee.internal.web.operations.AddServletOperation.generateServletMetaData(AddServletOperation.java:173)
	at org.eclipse.jst.j2ee.internal.web.operations.AddServletOperation.doExecute(AddServletOperation.java:109)
	at org.eclipse.wst.common.componentcore.internal.operation.ArtifactEditProviderOperation.execute(ArtifactEditProviderOperation.java:100)
	at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl$1.run(DataModelPausibleOperationImpl.java:376)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1737)
	at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.runOperation(DataModelPausibleOperationImpl.java:400)
	at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.runOperation(DataModelPausibleOperationImpl.java:352)
	at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.doExecute(DataModelPausibleOperationImpl.java:242)
	at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.executeImpl(DataModelPausibleOperationImpl.java:214)
	at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.cacheThreadAndContinue(DataModelPausibleOperationImpl.java:89)
	at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.execute(DataModelPausibleOperationImpl.java:202)
	at org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizard$1$CatchThrowableRunnableWithProgress.run(DataModelWizard.java:197)
	at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:369)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:313)
	at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:851)
	at org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizard.runOperations(DataModelWizard.java:206)
	at org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizard.performFinish(DataModelWizard.java:168)
	at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:680)
	at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:355)
	at org.eclipse.jface.dialogs.Dialog$3.widgetSelected(Dialog.java:660)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java(Compiled Code))
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java(Compiled Code))
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Inlined Compiled Code))
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java(Compiled Code))
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java(Compiled Code))
	at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code))
	at org.eclipse.jface.window.Window.open(Window.java:796)
	at org.eclipse.ui.internal.navigator.wizards.WizardShortcutAction.run(WizardShortcutAction.java:94)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:499)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:539)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:400)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java(Compiled Code))
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Inlined Compiled Code))
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java(Compiled Code))
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java(Compiled Code))
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java(Compiled Code))
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
	at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
	at java.lang.reflect.Method.invoke(Method.java:391)
	at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
	at org.eclipse.core.launcher.Main.run(Main.java:977)
	at org.eclipse.core.launcher.Main.main(Main.java:952)
Comment 2 Arthur Ryman CLA 2006-06-02 15:33:20 EDT
When I dismissed the error dialog I saw that the servlet java source was created and opened in the editor. The project has a red x and the Problems view shows:

Severity and Description	Path	Resource	Location	Creation Time	Id
CHKJ3000E: WAR Validation Failed: org.eclipse.jst.j2ee.commonarchivecore.internal.exception.DeploymentDescriptorLoadException: WEB-INF/web.xml		Project1	Unknown	1149276517117	17
Comment 3 Arthur Ryman CLA 2006-06-02 15:34:39 EDT
I checked web.xml and it was not updated with the new servlet mapping.
Comment 4 Arthur Ryman CLA 2006-06-02 15:38:20 EDT
Created attachment 43386 [details]
.log file showing Add Servlet failure
Comment 5 Arthur Ryman CLA 2006-06-02 15:47:52 EDT
I noticed that in the Project Explorer, the Deployment Descriptor node was missing. Sounds like a problem with the deployment descriptor.
Comment 6 John Lanuti CLA 2006-06-05 09:56:15 EDT
Duplicate of https://bugs.eclipse.org/bugs/show_bug.cgi?id=143229

*** This bug has been marked as a duplicate of 143229 ***
Comment 7 Arthur Ryman CLA 2006-06-26 15:17:56 EDT
Verified on WTP 1.5 RC6.
Comment 8 John Lanuti CLA 2006-09-26 10:08:01 EDT
Closing.