I deployed the Application which contains an Axis2 Client [1.7.3] to Websphere App Server. But it throws java.lang.InstantiationError: org.apache.axis2.databinding.ADBDataSource when the Axis2 client is trying to request a resource from the remote web service endpoint. The cause is from a line of code of generated Java class - the return line:
public org.apache.axiom.om.OMElement getOMElement(
final javax.xml.namespace.QName parentQName,
final org.apache.axiom.om.OMFactory factory)
throws org.apache.axis2.databinding.ADBException {
return factory.createOMElement(new org.apache.axis2.databinding.ADBDataSource(
this, MY_QNAME));
}
factory.createOMElement
is from axiom-api-1.2.19.jar.
Part of my pom.xml:
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-kernel</artifactId>
<version>1.7.3</version>
<exclusions>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-adb</artifactId>
<version>1.7.3</version>
<exclusions>
<exclusion>
<groupId>org.apache.ws.commons.axiom</groupId>
<artifactId>axiom-dom</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-transport-http</artifactId>
<version>1.7.3</version>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-transport-local</artifactId>
<version>1.7.3</version>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-xmlbeans</artifactId>
<version>1.7.3</version>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-jaxws</artifactId>
<version>1.7.3</version>
<exclusions>
<exclusion>
<groupId>org.apache.ws.commons.axiom</groupId>
<artifactId>axiom-dom</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-saaj</artifactId>
</exclusion>
</exclusions>
</dependency>
It can work in Tomcat 7 but not Websphere! So I guess part of Websphere library has an issue. Does anyone have experience on this?