Error Description:
Prompt when creating WebService interface service:
Unable add facets project Annotationwebservice CXF 2-x Web Services
Unable to add the follwing facets to project ANNOTATIONWEBSERVICE:CXF 2.x Web Services.
If you is getting below exception while creating annotation based Web Service using Apache CXF:
Unable to add the follwing facets to project ANNOTATIONWEBSERVICE:CXF 2.x Web Services. org.eclipse.wst.common.project.facet.core.FacetedProjectFrameworkException:Failed while installing CXF 2.x Web Services 1.0. At Org.eclipse.wst.common.project.facet.core.internal.FacetedProject.callDelegate (facetedproject.java:1507) 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$1.run (facetedproject.java:324) at Org.eclipse.core.internal.resources.Workspace.run (workspace.java:2345) at Org.eclipse.wst.common.project.facet.core.internal.FacetedProject.modify (facetedproject.java:339) at Org.eclipse.jst.ws.internal.consumption.ui.Common. Facetoperationdelegate$1.run (facetoperationdelegate.java:62) at org.eclipse.jface.operation.modalcontext$ Modalcontextthread.run (modalcontext.java:121) caused By:org.eclipse.core.runtime.CoreException:CXF runtime Location not set. Preferences > Web Services > CXf 2.x Preferences at Org.eclipse.jst.ws.internal.cxf.facet. Cxffacetinstalldelegate.execute (CXFFACETINSTALLDELEGATE.JAVA:50) at Org.eclipse.wst.common.project.facet.core.internal.FacetedProject.callDelegate (facetedproject.java:1477) ... 8 more
Analysis of the question:
This exception happens if you didn ' t add CXF run time environment and creating Web service. Follow below steps to add CXF run time environment:
The solution:
- Go to Apache CXF http://cxf.apache.org/download.html site and download binary distribution Apache-cxf-3.0.0-milestone2.zip or Latest version
- Unzip it to any folder of your choice
- In Eclipse click Window–> Preferences
- On Preferences window click Web services–> CXF 2.x preferences–> Select CXF Runtime-click Add
- Add CXF Runtime window Browse to select recently downloaded CXF home–> Click Finish
- Select run time Click apply–> OK
This should resolve issue unable add facets project Annotationwebservice CXF 2-x Web Services
"Java Error Notes"-Unable add facets project Annotationwebservice CXF 2-x Web Services