【问题标题】:AXIS2 Client doesn't work in WebsphereAXIS2 客户端在 Websphere 中不起作用
【发布时间】: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 库的一部分有问题。有人有这方面的经验吗?

【问题讨论】:

标签: java websphere axis2


【解决方案1】:

Axis2 1.6.1 与 WebSphere 7.x 到 8 兼容

  • 首先,找到axis2 1.6.1并解压。然后,打开存档。

  • 将带有以下属性的axis2.xml从false更新为true

  • 更新axis2_1_6_2\WEB-INF\conf文件夹中的文件

  • 导航到 Websphere 管理控制台。

  • 删除旧的axis2应用程序和目录。 - 首次安装不需要。

  • 安装更新的war文件axis2_1_6_2.war(**更新的Axis2.xml必须在war文件中),不要启动。

  • 完成安装,导航企业应用程序,单击axis2_1_6_2.war。

  • 点击Class Loading and update detection,选择Classes load with local class loader first (parent last)并点击apply

  • 直接保存到主配置。

  • 在企业应用程序中,单击管理模块。

  • 单击模块名称超链接 Apache-Axis2

  • 从下拉类加载器顺序 --> 选择首先使用本地类加载器加载的类(首先是父类),然后单击应用

  • 直接保存到主配置并单击确定 同样,直接保存到主配置

  • 选择war文件并单击开始,应显示应用程序启动成功消息

链接

用户名:管理员

密码:axis2

【讨论】:

    猜你喜欢
    • 2012-07-09
    • 2013-01-08
    • 1970-01-01
    • 2013-11-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-06-04
    • 1970-01-01
    相关资源
    最近更新 更多