【JAVA错误笔记】 - Unable add facets project AnnotationWebService CXF 2-x Web Services

错误描述:

创建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

时间: 2024-08-04 22:36:17

【JAVA错误笔记】 - Unable add facets project AnnotationWebService CXF 2-x Web Services的相关文章

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

错误描述:java.lang.NoClassDefFoundError:com.mchange.v2.ser.Indirector 原因分析: 这是c3p0的一个错误信息,我们在下载 c3p0时候,zip压缩包中,有三个jar,其中一个 c3p0-x.x.x.jar,还有一个  mchange.......jar的文件, 该错误原因就是缺少该jar;至于 该jar包的作用就是,一,解决上面的问题,二:本身作用,见,,,jar解压后的源码. 解决方案: mchange-commons-java-版

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

错误描述: Could not open ServletContext resource [/WEB-INF/applicationContext.xml] 原因分析: 问题主要由于加载spring的默认配置文件位置一般是在/WEB-INF/下找applicationContext.xml文件. 而Myeclipse文件自动生成的applicationContext文件是放在/WEB-INF/classes/applicationContext.xml. 所以在默认加载中是找到applicati

用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 that was discovered in the runpath: org.apache.spark.util.MutableURLClassLoaderSuite at org.scalatest.tools.DiscoverySuite$.getSuiteInstance(DiscoverySui

Android开发中java.lang.RuntimeException: Unable to start activity ComponentInfo{xxx}: java.lang.NullPointerException 错误的集中原因及解决办法

上面那个问题刚解决,就又来一个问题~~~~ 错误信息字符串:java.lang.RuntimeException: Unable to start activity ComponentInfo{...}: java.lang.NullPointerException 网上有不少解决办法 一般都会在Activity  onCreate()方法里的setContentView(XXX)发生此错误,网上查阅了很多原因,大概有四种重要可能的原因: 原因一:xxx的错误,若为R.layout.main 

android程序连接网络错误 java net unknownhostexception unable to reso

从网上拿了一个android的天气预报程序来学习,最后run的时候发现提示下面的错误: 按我的调试过程分2步,都是有关网络访问方面的问题. 第一个错误: android.os.NetworkOnMainThreadException at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1099) ...... 原因:是涉及到url操作的时候,访问网络不能在主程序中运行 解决:参考[http://ge

Java系列笔记(1) - Java 类加载与初始化

目录 类加载器 动态加载 链接 初始化 示例 类加载器 在了解Java的机制之前,需要先了解类在JVM(Java虚拟机)中是如何加载的,这对后面理解java其它机制将有重要作用. 每个类编译后产生一个Class对象,存储在.class文件中,JVM使用类加载器(Class Loader)来加载类的字节码文件(.class),类加载器实质上是一条类加载器链,一般的,我们只会用到一个原生的类加载器,它只加载Java API等可信类,通常只是在本地磁盘中加载,这些类一般就够我们使用了.如果我们需要从远

java学习笔记10--泛型总结

java学习笔记系列: java学习笔记9--内部类总结 java学习笔记8--接口总结 java学习笔记7--抽象类与抽象方法 java学习笔记6--类的继承.Object类 java学习笔记5--类的方法 java学习笔记4--对象的初始化与回收 java学习笔记3--类与对象的基础 java学习笔记2--数据类型.数组 java学习笔记1--开发环境平台总结 本文地址:http://www.cnblogs.com/archimedes/p/java-study-note10.html,转载

Android开发中java.lang.RuntimeException: Unable to start activity ComponentInfo{xxx}: java.lang.NullPoi

错误信息字符串:java.lang.RuntimeException: Unable to start activity ComponentInfo{com.first/com.first.Game}: java.lang.NullPointerException 一般都会在Activity  onCreate()方法里的setContentView(XXX)发生此错误,网上查阅了很多原因,大概有四种重要可能的原因: 原因一:xxx的错误,若为R.layout.main  那么应该是main.x

Java学习笔记_26_泛型概述

                                                               泛型概述 在Java中存入容器中的对象再取出时需要转换类型,因为对象加入容器会被转换成Object类型,而取出时要转换成实际类型.但向  下类型转换都 是存在潜在危险的,因此应该尽量避免它们.  Java的泛型: 所谓泛型就是在定义(类.方法.形参.成员变量等等)的时候,指 定它们为通用类型,也就是数据类型可以是任意类型. 泛型为提高大型程序的类型安全和维护带来了很大的潜