简体   繁体   English

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

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

I am trying to generate an axis2 webservice from a wsdl file in eclipse. 我试图从eclipse中的wsdl文件生成axis2 webservice。 I am hitting this error message : 我正在点击此错误消息:

 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

Indeed, there is no webapp folder/file in C:DEV\\axis2-1.4.1-war why am I hitting this issue ? 实际上,C:DEV \\ axis2-1.4.1-war中没有webapp文件夹/文件为什么我会遇到这个问题? Thanks a lot for your answers. 非常感谢你的回答。

EDIT : Other error now : 编辑:其他错误现在:

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

I had the same problem today and I could solve it doing the following: 我今天遇到了同样的问题,我可以通过以下方式解决问题:

  1. Download the Axis 2 binary distribution (link at the bottom) 下载Axis 2二进制发行版(底部链接)
  2. Extract it 提取它
  3. Enter Eclipse and go to Window > Preferences > Web Services > Axis2 Preferences 进入Eclipse并转到Window> Preferences> Web Services> Axis2 Preferences
  4. In the Axis2 runtime location field, points to your Axis2 installation directory (the one you created in step 2) Axis2运行时位置字段中,指向Axis2安装目录(您在步骤2中创建的目录)
  5. Click Apply 单击“ 应用”
  6. Close Preferences and try again 关闭首选项,然后重试

This worked for me. 这对我有用。 Remember that it is also necessary to install Axis2 war file in your Tomcat installation. 请记住,还需要在Tomcat安装中安装Axis2 war文件。 Link to all Axis2 packages . 链接到所有Axis2包

Try checking in your project properties -> Project Facets page. 尝试检入项目属性 - > Project Facets页面。 When I manually try to add the facet 'Axis2 Web Services' I get a more descriptive error 当我手动尝试添加方面'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 expects your project to be web type. Eclipse希望您的项目是web类型。 By this I mean if you use maven, it needs to be of <type>war</type> . 我的意思是,如果你使用maven,它需要是<type>war</type> If not, please add the details of eclipse project 如果没有,请添加eclipse项目的详细信息

Issue : This is important! 问题 :这很重要! However, one then bumps into the next error: Exception occurred during code generation for WSDL : java.lang.NoClassDefFoundError: org/apache/ws/commons/schema/XmlSchema Caused by: java.lang.ClassNotFoundException: org.apache.ws.commons.schema.XmlSchema cannot be found by org.apache.ant_1.9.4.v201504302020 - any ideas or workaround anyone? 然而,有人会遇到下一个错误:在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 - 任何想法或解决方法是谁?

Solution : I faced the same issue, seems like the issue got introduced from Axis2 1.7.0. 解决方案 :我遇到了同样的问题,似乎从Axis2 1.7.0引入了这个问题。 Issue got resolved after i reverted to Axis2 1.6.0 在我恢复到Axis2 1.6.0之后问题得到了解决

Make sure you have done the below steps mentioned by marcelocra : 确保您已完成marcelocra提到的以下步骤:

  1. Download the Axis 2 war distribution ( https://archive.apache.org/dist/axis/axis2/java/core/1.6.0/ ) 下载Axis 2战争发行版( https://archive.apache.org/dist/axis/axis2/java/core/1.6.0/
  2. Enter Eclipse and go to Window > Preferences > Web Services > Axis2 Preferences 进入Eclipse并转到Window> Preferences> Web Services> Axis2 Preferences
  3. In the Axis2 runtime location field, points to your Axis2 installation directory (the one you created in step 2), Click Apply and Close Preferences. 在Axis2运行时位置字段中,指向Axis2安装目录(在步骤2中创建的目录),单击“应用”和“关闭首选项”。
  4. Remember that it is also necessary to install Axis2 war file in your Tomcat installation. 请记住,还需要在Tomcat安装中安装Axis2 war文件。 Link to all Axis2 packages. 链接到所有Axis2包。

Try now, This worked for us. 现在试试,这对我们有用。

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

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