Axis2 error: unable to add the following faces

I am trying to create webservice axis2 from a wsdl file in eclipse. I find 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 

In fact, there is no webapp folder / file in C: DEV \ axis2-1.4.1-war why am I hit this problem? Thanks so much for your answers.

EDIT: Other error:

 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 
+6
source share
5 answers

I had the same problem today and could solve it by following these steps:

  • Download the Axis 2 binary distribution (link below)
  • Take it out
  • Enter Eclipse and go to Window> Settings> Web Services> Axis2 Settings
  • The Axis2 runtime location field indicates the Axis2 installation directory (the one you created in step 2)
  • Click Apply
  • Close Settings and try again

It worked for me. Remember that you also need to install the Axis2 war file in your Tomcat installation. Link to all Axis2 packages .

+14
source

Try checking project properties -> Fac Facets Page. When I manually try to add the Axis2 Web Services facet, 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 
+1
source

You need to download and use the binary distribution for axis2 axis in the "Eclipse Axis2 Preferences" settings (Eclipse → Window → Preferences → Web Services → Axis2 Preferences → Axis2. If you use war distribution, the Eclipse preferences page will not show an error. But if you try create a client from wsdl, you will get the error shown (I use Eclipse 3.7, I don’t know how newer versions will behave).

+1
source

Eclipse expects your project to be web . By this I mean that if you use maven, it must be <type>war</type> . If not, add eclipse project details

0
source

Problem : This is important! However, one of them then encounters the following error: An exception occurred while generating the code for WSDL: java.lang.NoClassDefFoundError: org / apache / ws / commons / schema / XmlSchema Raised: java.lang.ClassNotFoundException: org.apache .ws. commons.schema.XmlSchema could not be found org.apache.ant_1.9.4.v201504302020 - any ideas or workarounds?

Solution . I ran into the same problem, it seems the problem was introduced with Axis2 1.7.0. The problem was resolved after I returned to Axis2 1.6.0

Make sure that you have completed the following steps mentioned by marcelocra:

  • Download Axis 2 Military Distribution ( https://archive.apache.org/dist/axis/axis2/java/core/1.6.0/ )
  • Log in to Eclipse and go to window> Settings> Web Services> Axis2 Settings
  • In the Axis2 time location field, specify your Axis2 installation directory (the one you created in step 2), click "Apply" and "Close Settings".
  • Remember that you also need to install the Axis2 war file in your Tomcat installation. Link to all Axis2 packages.

Try it now, it worked for us.

0
source

Source: https://habr.com/ru/post/946776/


All Articles