Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-18117

Unable to remove the JAX-RS facet on a Dynamic Web Project version 3.1

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 4.2.0.CR2
    • 4.2.0.Beta3
    • upstream, webservices
    • None

      A bug in Eclipse WTP causes the following exception:

      java.lang.ClassCastException: org.eclipse.jst.javaee.web.internal.impl.WebAppImpl cannot be cast to org.eclipse.jst.j2ee.webapplication.WebApp
      	at org.eclipse.jst.ws.jaxrs.core.internal.project.facet.JAXRSFacetUninstallDelegate.uninstallJAXRSReferencesFromWebApp(JAXRSFacetUninstallDelegate.java:116)
      	at org.eclipse.jst.ws.jaxrs.core.internal.project.facet.JAXRSFacetUninstallDelegate.execute(JAXRSFacetUninstallDelegate.java:85)
      	at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.callDelegate(FacetedProject.java:1477)
      	at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.modifyInternal(FacetedProject.java:441)
      	at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.mergeChangesInternal(FacetedProject.java:1181)
      	at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.access$2(FacetedProject.java:1117)
      	at org.eclipse.wst.common.project.facet.core.internal.FacetedProject$5.run(FacetedProject.java:1099)
      	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)
      	at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.mergeChanges(FacetedProject.java:1109)
      	at org.eclipse.wst.common.project.facet.core.internal.FacetedProjectWorkingCopy.commitChanges(FacetedProjectWorkingCopy.java:2020)
      	at org.eclipse.wst.common.project.facet.ui.internal.FacetsPropertyPage$4.run(FacetsPropertyPage.java:232)
      	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)
      	at org.eclipse.wst.common.project.facet.ui.internal.FacetsPropertyPage$5.run(FacetsPropertyPage.java:246)
      	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
      
      

      the problem comes from an evaluation that checks for dynamic project facet version 2.5 or 3.0 but not higher, in JAXRSJEEUtils#isWebApp25or40(Object)

              xcoulon@redhat.com Xavier Coulon
              xcoulon@redhat.com Xavier Coulon
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: