Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 349541 - JAX-RS Facet assumes a project has a runtime when enabling the facet
Summary: JAX-RS Facet assumes a project has a runtime when enabling the facet
Status: RESOLVED FIXED
Alias: None
Product: WTP Webservices
Classification: WebTools
Component: jst.ws (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: 3.3.1   Edit
Assignee: Atosa Khoddamhazrati CLA
QA Contact: Keith Chong CLA
URL:
Whiteboard:
Keywords:
: 351958 (view as bug list)
Depends on:
Blocks: 355434
  Show dependency tree
 
Reported: 2011-06-16 06:56 EDT by Max Rydahl Andersen CLA
Modified: 2011-08-22 17:57 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Max Rydahl Andersen CLA 2011-06-16 06:56:00 EDT
Build Identifier: Indigo RC3

When trying to enable JAX-RS on a project that does not have a specific targeted runtime (common for most projects that doesn't want to tie to specific version during development) then you get the following exception when trying to enable the JAX-RS Facet and clicking "Further configuration needed"

java.lang.IllegalArgumentException
	at org.eclipse.wst.server.core.internal.facets.FacetUtil.getRuntime(FacetUtil.java:64)
	at org.eclipse.jst.server.core.FacetUtil.getRuntime(FacetUtil.java:47)
	at org.eclipse.jst.ws.jaxrs.ui.internal.project.facet.JAXRSFacetInstallPage.setWizardContext(JAXRSFacetInstallPage.java:493)
	at org.eclipse.wst.common.project.facet.ui.ModifyFacetedProjectWizard.handleSelectedFacetsChangedEvent(ModifyFacetedProjectWizard.java:723)
	at org.eclipse.wst.common.project.facet.ui.ModifyFacetedProjectWizard.createPageControls(ModifyFacetedProjectWizard.java:310)
	at org.eclipse.jface.wizard.WizardDialog.createPageControls(WizardDialog.java:736)
	at org.eclipse.jface.wizard.WizardDialog.createContents(WizardDialog.java:608)
	at org.eclipse.jface.window.Window.create(Window.java:431)
	at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
	at org.eclipse.jface.window.Window.open(Window.java:790)
	at org.eclipse.wst.common.project.facet.ui.internal.FacetsPropertyPage.handleFurtherConfigHyperlinkEvent(FacetsPropertyPage.java:533)
	at org.eclipse.wst.common.project.facet.ui.internal.FacetsPropertyPage.access$5(FacetsPropertyPage.java:491)
	at org.eclipse.wst.common.project.facet.ui.internal.FacetsPropertyPage$7.linkActivated(FacetsPropertyPage.java:476)
	at org.eclipse.ui.forms.widgets.AbstractHyperlink.handleActivate(AbstractHyperlink.java:233)
	at org.eclipse.ui.forms.widgets.AbstractHyperlink.handleMouseUp(AbstractHyperlink.java:327)
	at org.eclipse.ui.forms.widgets.AbstractHyperlink.access$2(AbstractHyperlink.java:311)
	at org.eclipse.ui.forms.widgets.AbstractHyperlink$4.handleEvent(AbstractHyperlink.java:125)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4123)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1457)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1480)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1465)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1270)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3969)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3608)
	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:158)
	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.Display.sendEvent(Display.java:4123)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1457)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1480)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1465)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1270)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3969)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3608)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
	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:344)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	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:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)

Reproducible: Always

Steps to Reproduce:
1. create a dynamic web project with no targeted runtime
2. open project properties and go to facets and enable JAX-RS
3. click Further Configuration
Comment 1 Keith Chong CLA 2011-06-16 15:47:19 EDT
Hi Max,

Looks like this is a problem in the Helios stream too.  Is it ok to you if we target this for 3.3.1 and 3.2.5?
Comment 2 Max Rydahl Andersen CLA 2011-06-21 04:51:16 EDT
(In reply to comment #1)
> Hi Max,
> 
> Looks like this is a problem in the Helios stream too.  Is it ok to you if we
> target this for 3.3.1 and 3.2.5?

All good for me.
Comment 3 Keith Chong CLA 2011-07-20 22:42:48 EDT
*** Bug 351958 has been marked as a duplicate of this bug. ***
Comment 4 Keith Chong CLA 2011-08-22 17:57:26 EDT
Released for 3.3.1