我正在尝试从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
答案 0 :(得分:17)
我今天遇到了同样的问题,我可以通过以下方式解决问题:
这对我有用。请记住,还必须在Tomcat安装中安装Axis2 war 文件。 Link to all Axis2 packages
答案 1 :(得分:1)
尝试检入项目属性 - &gt; 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
答案 2 :(得分:1)
您必须在“Eclipse Axis2偏好设置”中下载并使用axis2的二进制分布。 (Eclipse - &gt; Window - &gt; Preferences - &gt; Web Services - &gt; Axis2 Preferences - &gt; Axis2运行时位置。 如果使用war分发,则Eclipse首选项页面不会显示错误。但是,如果您尝试使用wsdl创建客户端,则会出现显示的错误(我使用Eclipse 3.7,我不知道新版本的行为方式)。
答案 3 :(得分:0)
Eclipse期望您的项目为web
类型。我的意思是,如果你使用maven,它必须是<type>war</type>
。如果没有,请添加eclipse项目的详细信息
答案 4 :(得分:0)
问题:这很重要!然而,有人会遇到下一个错误:在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提及的以下步骤:
立即尝试,这对我们有用。