繁体   English   中英

Axis2错误:无法添加以下方面

[英]Axis2 error : Unable to add the following facets

我试图从eclipse中的wsdl文件生成axis2 webservice。 我正在点击此错误消息:

 Unable to add the following facetsto project AnnuaireAAAAAAAA: Axis2 Web Services Extensions, Axis2 Web Services Core.
    org.eclipse.wst.common.project.facet.core.FacetedProjectFrameworkException: Failed while installing Axis2 Web Services Core 1.1.
    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:2344)
    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: The Axis2 facets cannot be installed since the Axis2 runtime location has not been set.
    Go to the Web Services preference page and set the Axis2 runtime location under Axis2 Preferences.
    at org.eclipse.jst.ws.axis2.facet.deligate.Axis2CoreFacetInstallDelegate.execute(Axis2CoreFacetInstallDelegate.java:50)
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.callDelegate(FacetedProject.java:1477)
    ... 8 more
    Caused by: java.io.FileNotFoundException: C:\DEV\axis2-1.4.1-war\webapp (Le fichier spécifié est introuvable)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(Unknown Source)
    at org.eclipse.jst.ws.axis2.core.utils.FileUtils.copy(FileUtils.java:158)
    at org.eclipse.jst.ws.axis2.core.utils.FileUtils.copyDirectory(FileUtils.java:151)
    at org.eclipse.jst.ws.axis2.facet.utils.Axis2WebappUtils.copyAxis2War(Axis2WebappUtils.java:94)
    at org.eclipse.jst.ws.axis2.facet.commands.Axis2WebservicesServerCommand.executeOverride(Axis2WebservicesServerCommand.java:85)
    at org.eclipse.jst.ws.axis2.facet.deligate.Axis2CoreFacetInstallDelegate.execute(Axis2CoreFacetInstallDelegate.java:43)
    ... 9 more

实际上,C:DEV \\ axis2-1.4.1-war中没有webapp文件夹/文件为什么我会遇到这个问题? 非常感谢你的回答。

编辑:其他错误现在:

Unable to add the follwing facets to project AnnuaireAAAAAAA: Axis2 Web Services Extensions, Axis2 Web Services Core.
    org.eclipse.wst.common.project.facet.core.FacetedProjectFrameworkException: Failed while installing Axis2 Web Services Core 1.1.
    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:2344)
    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: java.lang.NullPointerException
    at org.eclipse.wst.validation.internal.DisabledResourceManager.save(DisabledResourceManager.java:67)
    at org.eclipse.wst.validation.internal.DisabledResourceManager.disableValidation(DisabledResourceManager.java:49)
    at org.eclipse.wst.validation.ValidationFramework.disableValidation(ValidationFramework.java:129)
    at org.eclipse.jst.ws.axis2.facet.commands.Axis2WebservicesServerCommand.executeOverride(Axis2WebservicesServerCommand.java:110)
    at org.eclipse.jst.ws.axis2.facet.deligate.Axis2CoreFacetInstallDelegate.execute(Axis2CoreFacetInstallDelegate.java:43)
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.callDelegate(FacetedProject.java:1477)
    ... 8 more

我今天遇到了同样的问题,我可以通过以下方式解决问题:

  1. 下载Axis 2二进制发行版(底部链接)
  2. 提取它
  3. 进入Eclipse并转到Window> Preferences> Web Services> Axis2 Preferences
  4. Axis2运行时位置字段中,指向Axis2安装目录(您在步骤2中创建的目录)
  5. 单击“ 应用”
  6. 关闭首选项,然后重试

这对我有用。 请记住,还需要在Tomcat安装中安装Axis2 war文件。 链接到所有Axis2包

尝试检入项目属性 - > Project Facets页面。 当我手动尝试添加方面'Axis2 Web Services'时,我得到一个更具描述性的错误

The Axis2 facets cannot be installed since the Axis2 runtime location has not been set.

Go to the Web Services preference page and set the Axis2 runtime location under Axis2 Preferences

您必须在“Eclipse Axis2首选项”(Eclipse - >窗口 - >首选项 - > Web服务 - > Axis2首选项 - > Axis2运行时位置)下载并使用axis2的二进制分发。如果您使用war分发Eclipse首选项页面不会显示错误。但如果您尝试使用wsdl创建客户端,则会出现显示的错误(我使用的是Eclipse 3.7,我不知道新版本的行为方式)。

Eclipse希望您的项目是web类型。 我的意思是,如果你使用maven,它需要是<type>war</type> 如果没有,请添加eclipse项目的详细信息

问题 :这很重要! 然而,有人会遇到下一个错误:在WSDL的代码生成期间发生异常:java.lang.NoClassDefFoundError:org / apache / ws / commons / schema / XmlSchema引起:java.lang.ClassNotFoundException:org.apache.ws。 org.apache.ant_1.9.4.v201504302020无法找到commons.schema.XmlSchema - 任何想法或解决方法是谁?

解决方案 :我遇到了同样的问题,似乎从Axis2 1.7.0引入了这个问题。 在我恢复到Axis2 1.6.0之后问题得到了解决

确保您已完成marcelocra提到的以下步骤:

  1. 下载Axis 2战争发行版( https://archive.apache.org/dist/axis/axis2/java/core/1.6.0/
  2. 进入Eclipse并转到Window> Preferences> Web Services> Axis2 Preferences
  3. 在Axis2运行时位置字段中,指向Axis2安装目录(在步骤2中创建的目录),单击“应用”和“关闭首选项”。
  4. 请记住,还需要在Tomcat安装中安装Axis2 war文件。 链接到所有Axis2包。

现在试试,这对我们有用。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM