Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 326549 - Web Service Wizard Can Default to invalid project type
Summary: Web Service Wizard Can Default to invalid project type
Status: RESOLVED FIXED
Alias: None
Product: WTP Webservices
Classification: WebTools
Component: jst.ws (show other bugs)
Version: 3.2.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2.2 P   Edit
Assignee: Mark Hutchinson CLA
QA Contact: Keith Chong CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-29 11:16 EDT by Mark Hutchinson CLA
Modified: 2010-10-15 18:40 EDT (History)
0 users

See Also:
keith.chong.ca: review+


Attachments
proposed patch (15.84 KB, patch)
2010-09-29 11:41 EDT, Mark Hutchinson CLA
keith.chong.ca: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Hutchinson CLA 2010-09-29 11:16:27 EDT
We are using the org.eclipse.jst.ws.consumption.ui.serviceRuntimes extension point.  We contribute a couple different service runtimes for creating EJB Web Services, with different "required-facet-version" elements.   Some servers do not support all of the required facet versions.  not every server supports every service runtime.

The bug is that sometimes the web service runtime that is selected as the default by our wizard is not supported by any "server runtime" installed.  When doing the defaulting the server runtime is not being considered.

This results in a NPE being logged:
java.lang.NullPointerException
    at org.eclipse.jst.ws.internal.creation.ui.widgets.runtime.ServerRuntimeSelectionWidgetDefaultingCommand.execute(ServerRuntimeSelectionWidgetDefaultingCommand.java:201)
    at org.eclipse.jst.ws.internal.creation.ui.widgets.ServerWizardWidget.refreshServerRuntimeSelection(ServerWizardWidget.java:1563)
    at org.eclipse.jst.ws.internal.creation.ui.widgets.ServerWizardWidget.access$24(ServerWizardWidget.java:1547)


Also the "service project" selected by the wizard can be invalid.  If the user tries to proceed with through the wizard with this invalid project they will hit another NPE:

   at org.eclipse.jst.ws.internal.creation.ui.extension.PreServiceDevelopCommand.execute(Unknown Source)
      at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.runCommand(Unknown Source)
      at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.visitTop(Unknown Source)
      at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.moveForwardToNextStop(Unknown Source)
      at org.eclipse.wst.command.internal.env.ui.widgets.SimpleCommandEngineManager$6.run(Unknown Source)
      at org.eclipse.jface.operation.ModalContext.runInCurrentThread(Unknown Source)
      at org.eclipse.jface.operation.ModalContext.run(Unknown Source)


So basically we are not considering all of the information specified in the extension when doing our defaulting.  We are picking the wrong default webservice runtime and project type.  If the user tries to proceed through the wizard with these incorrect defaults then they will run into errors.
Comment 1 Mark Hutchinson CLA 2010-09-29 11:41:31 EDT
Created attachment 179860 [details]
proposed patch
Comment 2 Keith Chong CLA 2010-09-30 11:42:13 EDT
The patch looks good.
Comment 3 Keith Chong CLA 2010-10-05 00:06:01 EDT
Patch has been released to 3.2.2 P.
Comment 4 Keith Chong CLA 2010-10-05 00:08:05 EDT
Hi Mark, can you please ensure you apply this fix for WTP 3.3 and 3.2.3?

Thanks.
Comment 5 Mark Hutchinson CLA 2010-10-15 11:51:31 EDT
Committed to R3_2_maintenance and head.
Comment 6 Keith Chong CLA 2010-10-15 18:40:06 EDT
Released to 3.3.