Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Axis2 error : Unable to add the following facets

I am trying to generate an axis2 webservice from a wsdl file in eclipse. 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 ? 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
like image 938
flow Avatar asked Jun 07 '13 12:06

flow


3 Answers

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)
  2. Extract it
  3. Enter Eclipse and go to 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)
  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. Link to all Axis2 packages.

like image 166
marcelocra Avatar answered Nov 15 '22 19:11

marcelocra


Try checking in your project properties -> Project Facets page. When I manually try to add the facet 'Axis2 Web Services' I get a more descriptive error

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
like image 44
Erich Avatar answered Nov 15 '22 21:11

Erich


You have to download and use the binary distribution of axis2 in your 'Eclipse Axis2 Preferences' (Eclipse -> Window -> Preferences -> Web Services -> Axis2 Preferences -> Axis2 runtime location. If you use the war distribution the Eclipse preference page won't show an error. But if you try do create a client out of a wsdl you get the shown error (I'm using Eclipse 3.7, I don't know how newer versions will behave).

like image 1
Klendatho Avatar answered Nov 15 '22 20:11

Klendatho