IBM Support

java.lang.NoClassDefFoundError: org/xml/sax/helpers/NamespaceSupport running application in CICS TS 5.1

Question & Answer


Question

You just migrated to CICS TS 5.1 running with Java7_64 on z/OS 1.13. Your application use to work without any problems but now it is failing with the following exception:

java.lang.NoClassDefFoundError: org/xml/sax/helpers/NamespaceSupport 
    at org.apache.tsik.c14n.StreamCanonicalizer.canonicalize(StreamCanonicalizer.java:107)
    at org.apache.tsik.xmlsig.elements.transforms.ExclusiveC14nTransform.transformToOctetStream
       (ExclusiveC14nTransform.java:48)
    at org.apache.tsik.xmlsig.elements.Transforms.transform(Transforms.java:152)
    at org.apache.tsik.xmlsig.elements.Reference.evaluateUri(Reference.java:275)
    at org.apache.tsik.xmlsig.elements.Reference.calculate(Reference.java:290)
    at org.apache.tsik.xmlsig.elements.SignedInfo.calculateReferences(SignedInfo.java:73)
    at org.apache.tsik.xmlsig.Signer.sign(Signer.java:916)
    at org.apache.tsik.xmlsig.Signer.signInPlace(Signer.java:778)
    at com.cgi.translation.DomTools.signSOAPResponse(DomTools.java:554)
    at com.cgi.translation.DomTools.packageSOAPResponse(DomTools.java:509)
    at com.cgi.translation.VendorResponse.transformXml(VendorResponse.java:137)
    at com.cgi.translation.AdapterResponse.translate(AdapterResponse.java:145)
    at com.cgi.webservice.APIWebNotifyService.run(APIWebNotifyService.java:103)
    at com.cgi.webservice.APIWebNotifyService.main(APIWebNotifyService.java:53)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
    at java.lang.reflect.Method.invoke(Method.java:618)
    at com.ibm.cics.server.Wrapper.call_main(Wrapper.java:881)
    at com.ibm.cics.server.Wrapper.callOSGiClass(Wrapper.java:2477)
    at com.ibm.cics.server.Wrapper.invokeJvmServerOSGiClass(Wrapper.java:2383)
    at com.ibm.cics.server.Wrapper.jvmServerOSGiEntry(Wrapper.java:2341)
    at com.ibm.cics.osgi.impl.Controller.runService(Controller.java:903)
    at com.ibm.cics.osgi.impl.Controller.acceptRequest(Controller.java:226)
    at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
    at java.lang.reflect.Method.invoke(Method.java:618)
    at com.ibm.cics.router.Router.route(Router.java:2327)

Answer

To resolve this problem you need to add org.xml.sax and org.xml.sax.helpers into the bundle manifest file to ensure that they are correctly exposed. The specification for OSGI says that all required packages for a bundle must be imported for it to be able to find the classes required.

External JVM classes such as org.xml.sax.* should be imported into a bundle for it to function correctly.

Internal JVM classes such as com.ibm.xylem.* are not exposed outside of the JVM internals cannot be imported by a bundle.

CICS uses the Equinox implementation of the OSGI Service platform. This is documented within the CICS Knowledge Center along with the OSGI specification in the section "OSGi Service Platform Release 4 Version 4.3".

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSGMGV","label":"CICS Transaction Server"},"Platform":[{"code":"PF035","label":"z\/OS"}],"Component":"Java","Version":"5.1","Line of Business":{"code":"LOB35","label":"Mainframe SW"}}]

Product Synonym

CICS/TS CICSTS CICS TS CICS Transaction Server

Document Information

Modified date:
16 December 2014

UID

dwa1168062