【发布时间】:2017-02-28 04:49:50
【问题描述】:
我将包含 Axis2 Client [1.7.3] 的应用程序部署到 Websphere App Server。但是当 Axis2 客户端尝试从远程 Web 服务端点请求资源时,它会抛出 java.lang.InstantiationError: org.apache.axis2.databinding.ADBDataSource。 原因来自生成的Java类的一行代码-返回行:
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 来自 axiom-api-1.2.19.jar。
我的 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>
它可以在 Tomcat 7 中运行,但不能在 Websphere 中运行!所以我猜 Websphere 库的一部分有问题。有人有这方面的经验吗?
【问题讨论】:
-
您使用的是哪个版本的 WebSphere Application Server?你见过ibm.com/developerworks/community/forums/html/…
-
Websphere 版本为 7.0.0.39