zoukankan      html  css  js  c++  java
  • 【JAVA错误笔记】

    错误描述:

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

    Unable add facets project AnnotationWebService CXF 2-x Web Services

    • On Preferences window click Web Services –> CXF 2.x Preferences –> Select CXF Runtime — Click Add

    Unable add facets project AnnotationWebService CXF 2-x Web Services

    • Add CXF Runtime window browse to select recently downloaded CXF home –> Click Finish

    Unable add facets project AnnotationWebService CXF 2-x Web Services

    • Select run time click apply –> OK

    Unable add facets project AnnotationWebService CXF 2-x Web Services

    This should resolve issue Unable add facets project AnnotationWebService CXF 2-x Web Services

  • 相关阅读:
    mysql 查找数组格式的字符串中是否包含某个值
    假期总结
    shell循环结构解析:for/while/case
    ansible笔记(15):循环(二)with_items/with_list/with_together/with_flattened
    ansible笔记(14):循环(一)
    解决报错Failed to start LSB: Bring up/down networking:MAC地址导致
    实现ENSP模拟器与物理主机、虚拟机通信
    zabbix4.2配置监控华为路由器:基于ENSP模拟器
    Grafana展示zabbix监控数据
    zabbix4.2配置监控TCP连接状态
  • 原文地址:https://www.cnblogs.com/Tmc-Blog/p/5802322.html
Copyright © 2011-2022 走看看