0
votes

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?

1
Which version of WebSphere Application Server are you using? Have you seen ibm.com/developerworks/community/forums/html/…Alexandre Polozoff
Websphere version is 7.0.0.39John

1 Answers

0
votes

Axis2 1.6.1 is compatible with WebSphere 7.x to 8

  • First of all, find axis2 1.6.1 and extract. Then, open archive.

Open archive 7-Zip or WinZip

  • Update the axis2.xml with the following attribute from false to true

enter image description here

  • Update the file in the axis2_1_6_2\WEB-INF \conf folder

  • Navigate to Websphere Admin Console.

  • Remove old-axis2 application and directory. - Not required for first installation.

  • Install updated war file axis2_1_6_2.war (**Updated Axis2.xml must be in the war file), do not start.

  • Complete installation, and navigate Enterprise Applications, click axis2_1_6_2.war.

  • Click on Class Loading and update detection, select Classes loaded with local class loader first (parent last) and click apply

  • Save directly to the master configuration.

  • In Enterprise Applications, click manage modules.

  • Click on the Module Name Hyperlink Apache-Axis2

  • From the drop down Class Loader Order --> Select Classes loaded with local class loader first (parent first) and click apply

  • Save directly to master configuration and click OK Again, save directly to master configuration

  • Select the war file and Click Start, Application started successfully message should be displayed

Links

Username : admin

Password : axis2