9

Eclipse で wsdl ファイルから axis2 Web サービスを生成しようとしています。このエラーメッセージが表示されます:

 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 フォルダー/ファイルがありません。なぜこの問題が発生するのですか? ご回答ありがとうございます。

EDIT:その他のエラー:

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
4

5 に答える 5

23

今日も同じ問題があり、次のようにして解決できました。

  1. Axis 2 バイナリ ディストリビューションをダウンロードします (下部のリンク)。
  2. 抽出する
  3. Eclipseに入り、 [ウィンドウ] > [設定] > [Web サービス] > [Axis2 設定]に移動します。
  4. [ Axis2 ランタイムの場所]フィールドで、Axis2 インストール ディレクトリ (手順 2 で作成したディレクトリ) を指します。
  5. [適用] をクリックします
  6. 環境設定を閉じて、もう一度やり直してください

これは私にとってはうまくいきました。Tomcat インストールにAxis2 warファイルもインストールする必要があることに注意してください。すべての Axis2 パッケージへのリンク

于 2014-03-17T14:44:21.660 に答える
1

プロジェクトのプロパティ -> プロジェクト ファセット ページを確認してみてください。ファセット「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
于 2013-08-31T01:53:33.690 に答える
0

Eclipse は、プロジェクトがwebtype であることを想定しています。つまり、maven を使用する場合は、 of である必要があり<type>war</type>ます。そうでない場合は、Eclipse プロジェクトの詳細を追加してください

于 2013-06-07T12:36:01.417 に答える
0

問題:これは重要です!ただし、次のエラーが発生します: WSDL のコード生成中に例外が発生しました: java.lang.NoClassDefFoundError: org/apache/ws/commons/schema/XmlSchema 原因: java.lang.ClassNotFoundException: org.apache.ws. commons.schema.XmlSchema が org.apache.ant_1.9.4.v201504302020 で見つからない - アイデアや回避策はありますか?

解決策:同じ問題に直面しました。この問題は Axis2 1.7.0 から導入されたようです。Axis2 1.6.0 に戻したら問題は解決しました

marcelocra で言及されている以下の手順を実行したことを確認してください。

  1. Axis 2 war ディストリビューションをダウンロードします ( https://archive.apache.org/dist/axis/axis2/java/core/1.6.0/ )
  2. Eclipse に入り、[ウィンドウ] > [設定] > [Web サービス] > [Axis2 設定] に移動します。
  3. [Axis2 ランタイムの場所] フィールドで、Axis2 インストール ディレクトリ (手順 2 で作成したディレクトリ) を指定し、[適用] をクリックして [設定を閉じる] をクリックします。
  4. Tomcat インストールに Axis2 war ファイルもインストールする必要があることに注意してください。すべての Axis2 パッケージへのリンク。

今すぐ試してみてください。これでうまくいきました。

于 2016-02-26T11:44:29.920 に答える