错误描述:

创建webservice接口服务时候提示:

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 are 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. Please set location in 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. Please 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错误笔记】 - Unable add facets project AnnotationWebService CXF 2-x Web Services的更多相关文章

  1. tomcat启动时检测到循环继承而栈溢出的问题:Caused by: java.lang.IllegalStateException: Unable to complete the scan for annotations for web application [/test] due to a StackOverflowError. Possible root causes include

    最近在公司更新一个老项目的时候,发现部署项目后tomcat报错,错误如下: Caused by: java.lang.IllegalStateException: Unable to complete ...

  2. Caused by: java.lang.IllegalStateException: Unable to complete the scan for annotations for web application [/Cppcc] due to a StackOverflowError. Possible root causes include a too low setting for -Xs

    解决办法:(1)修改D:\Java\apache-tomcat-7.0.88\conf\catalina.properties (122line) (2)如org.apache.catalina.st ...

  3. java错误笔记

    错误1. Description       Resource Path Location   Type The superclass "javax.servlet.http.HttpSer ...

  4. 【JAVA错误笔记】 - c3p0问题java.lang.NoClassDefFoundError:com.mchange.v2.ser.Indirector

    错误描述:java.lang.NoClassDefFoundError:com.mchange.v2.ser.Indirector 原因分析: 这是c3p0的一个错误信息,我们在下载 c3p0时候,z ...

  5. 【JAVA错误笔记】 - 【Could not open ServletContext resource [/WEB-INF/applicationContext.xml]解决方法】

    错误描述: Could not open ServletContext resource [/WEB-INF/applicationContext.xml] 原因分析: 问题主要由于加载spring的 ...

  6. Unable to complete the scan for annotations for web application [/wrs] due to a StackOverflowError. Possible root causes include a too low setting for -Xss and illegal cyclic inheritance dependencies.

    tomcat启动报错:Jul 20, 2018 11:48:37 AM org.apache.catalina.core.ContainerBase addChildInternalSEVERE: C ...

  7. 使用LoadRunner对Web Services进行调用--Add Service Call

    利用LoadRunner对Web Services进行测试时,通常有三种可供采用的方法: 在LoadRunner的Web Services虚拟用户协议中,[Add Service Call] 在Loa ...

  8. 用idea+maven编译打包spark project core错误:java.lang.RuntimeException: Unable to load a Suite class

    Discovery starting. *** RUN ABORTED *** java.lang.RuntimeException: Unable to load a Suite class tha ...

  9. android升级后错误:Unable to execute dex: java.nio.BufferOverflowException.Check

    Android SDK Tools升级为22.3,Android SDK Platform-tools 升级为19后,编译工程出现错误: Unable to execute dex: java.nio ...

随机推荐

  1. testng 注解

    testng.xml suite(套件):  由一个或多个测试组成 test(测试):  由一个或多个类组成 class(类):  一个或多个方法组成 @BeforeSuite: 在某个测试套件开始之 ...

  2. 【原】 Spark中Task的提交源码解读

    版权声明:本文为原创文章,未经允许不得转载. 复习内容: Spark中Stage的提交 http://www.cnblogs.com/yourarebest/p/5356769.html Spark中 ...

  3. 【CSS3】Advanced10:Gradient

    1.background:linear-gradient(20deg/(to) bottom right,orange,red,hsl(60,100%,50%)); 2.-webkit-chrome/ ...

  4. leetcode—pascal triangle

    1.题目描述 Given numRows, generate the first numRows of Pascal's triangle.   For example, given numRows ...

  5. HW2.12

    控制台: import java.util.Scanner; public class Solution { public static void main(String[] args) { Scan ...

  6. CodeForces 540E - Infinite Inversions(离散化+树状数组)

    花了近5个小时,改的乱七八糟,终于A了. 一个无限数列,1,2,3,4,...,n....,给n个数对<i,j>把数列的i,j两个元素做交换.求交换后数列的逆序对数. 很容易想到离散化+树 ...

  7. Redis学习资料汇总(荐)

    Redis学习手册系列: http://www.cnblogs.com/stephen-liu74/category/354125.html Redis详解:sorted sets数据类型及操作-IT ...

  8. Prime Land

    http://poj.org/problem?id=1365 题意:给定一个数字n的拆分形式,然后让你求解n-1的值: 解析:直接爆搞 // File Name: poj1365.cpp // Aut ...

  9. JAVA_3lesson

    程序设计守则 为了增加程序的可扩展性,维护性.可以采用interface, abstract   可以抽象出来:共同的方法,属性   开发系统时,主体构架使用接口,接口构成了系统的骨架.   要遵循开 ...

  10. 分布式存储Ceph的几种安装方法,源码,apt-get,deploy工具,Ubuntu CentOS

    最近搞了下分布式PB级别的存储CEPH  尝试了几种不同的安装,使用 期间遇到很多问题,和大家一起分享. 一.源码安装 说明:源码安装可以了解到系统各个组件, 但是安装过程也是很费劲的,主要是依赖包太 ...