Troubleshooting
Problem
This technote treats a problem in the IBM Rational Portfolio Manager workflow's External action invocation. The invocation fails, when you configure the middleware environment with IBM WebSphere Application Server (WAS) and use the PARENT_FIRST classloader setting.
Symptom
Null Point Exception when using the WebSphere 5.1 SOAP classes, possible errors is as follows:
CODE:
GMT] e48dab SystemErr R java.lang.NullPointerException
[11/13/08 9:50:18:743 GMT] e48dab SystemErr R at java.lang.Class.isAssignableFrom(Native Method)
[11/13/08 9:50:18:744 GMT] e48dab SystemErr R at com.ibm.ws.webservices.engine.xmlsoap.builders.SOAPBodyBuilder.onStartChild(SOAPBodyBuilder.java:338)
[11/13/08 9:50:18:744 GMT] e48dab SystemErr R at com.ibm.ws.webservices.engine.events.P2DConverter.startElement(P2DConverter.java:350)
[11/13/08 9:50:18:744 GMT] e48dab SystemErr R at com.ibm.ws.webservices.engine.events.P2DConverter.startElement(P2DConverter.java:291)
[11/13/08 9:50:18:744 GMT] e48dab SystemErr R at sax.SAX2DocumentEntityParserBase.startElement(Unknown Source)
[11/13/08 9:50:18:744 GMT] e48dab SystemErr R at sax.latin.LatinWFCSAX2DocumentEntityParser.startElement(Unknown Source)
[11/13/08 9:50:18:744 GMT] e48dab SystemErr R at sax.SAX2DocumentEntityParserBase.startElementAction(Unknown Source)
[11/13/08 9:50:18:745 GMT] e48dab SystemErr R at util.DocumentEntityParserBase.startElementEvent(Unknown Source)
CODE
Cause
The problem is with class loading. That means which class does the web application load loaded to initiate SOAP client calls.
By default the WebSphere Java Virtual Machine sets the server classloader mode to PARENT_FIRST. In this way the Rational Portfolio Manager's middleware will use WebSphere's SOAP classes for any outgoing SOAP call. Unfortunately, these SOAP classes are incompatible with the Axis services in WebSphere 5.1.1.4. This is the version that we use.
Resolving The Problem
The options are PARENT_FIRST and PARENT_LAST. The default is to search in the parent class loader before searching in the application class loader to load a class.
You change the classloader mode to PARENT_LAST for the Web module.
When the application's name is RPMDEV, for example, the path to the setting in WebSphere is:
Enterprise Applications>RPMDEV>Web Module>rpm-middleware-7.1.1.1.war
The setting is Classloader Mode.
Now Portfolio Manager picks up SOAP client classes form its own WEB-INF. The Axis SOAP client classes load and function, because the Axis jars are present in WEB-INF/lib,.
Remarks
- In the Tomcat-Axis scenario it works without modifications, because Tomcat's classloading policies always follow the equivalent of the PARENT_LAST setting.
- Changing the class loader can bring forth issues with the class hierarchical dependencies, with WAS itself and its support classes.
- If you specify PARENT_LAST, your application can override classes from the parent class loader. However, this action might result in ClassCastException or LinkageErrors, if you have mixed usage of overridden classes and non-overridden classes.
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21366463