Using RAD v7 with WebSphere AS v6.1, I am receiving the following;
java.lang.NoSuchMethodError: org/apache/axiom/om/OMAbstractFactory.getMetaFactory()Lorg/apache/axiom/om/OMMetaFactory;
Other answers (here and here) have indicated that this is due to conflicting jars. I have installed the latest RAD/WS fixpack, made sure I'm using only one version of axis2 (v1.6.2) & axiom-api (v1.2.13), cleaned & built my workspace multiple times and made sure the correct jars are being deployed. I have also tried setting the WAS class loader policy to "parent last".
My question: Is there any reason other than conflicting jar versions that would cause this problem?
Longer error:
WebApp E [Servlet Error]-[EOEServlet]: java.lang.NoSuchMethodError: org/apache/axiom/om/OMAbstractFactory.getMetaFactory()Lorg/apache/axiom/om/OMMetaFactory; at org.apache.axiom.om.OMXMLBuilderFactory.createOMBuilder(OMXMLBuilderFactory.java:150) at org.apache.axiom.om.OMXMLBuilderFactory.createOMBuilder(OMXMLBuilderFactory.java:133) at org.apache.axiom.om.OMXMLBuilderFactory.createOMBuilder(OMXMLBuilderFactory.java:104) at org.apache.axis2.util.XMLUtils.toOM(XMLUtils.java:590) at org.apache.axis2.util.XMLUtils.toOM(XMLUtils.java:575) at org.apache.axis2.deployment.DescriptionBuilder.buildOM(DescriptionBuilder.java:97) at org.apache.axis2.deployment.AxisConfigBuilder.populateConfig(AxisConfigBuilder.java:90) at org.apache.axis2.deployment.DeploymentEngine.populateAxisConfiguration(DeploymentEngine.java:857) at org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(FileSystemConfigurator.java:116) at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:64) at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:210) at org.apache.axis2.client.ServiceClient.configureServiceClient(ServiceClient.java:151) at org.apache.axis2.client.ServiceClient.(ServiceClient.java:144)
Axis2 and Axiom are part of the WebSphere runtime in version 7.0 and above, as well as in version 6.1 with the Web Services Feature Pack installed. They provide the JAX-WS implementation in WebSphere and their classes are visible to applications. That causes conflicts with applications that package their own versions of these libraries. To solve this problem, you need to switch the class loader policy to parent last.
Note that in some cases this may not be enough and you need to make some additional changes as described here:
https://axis.apache.org/axis2/java/core/docs/app_server.html