IBM Support

Configure IBM Business Process Manager to parse XMLType data in Oracle database through WebSphere JDBC Adapter

Technical Blog Post


Abstract

Configure IBM Business Process Manager to parse XMLType data in Oracle database through WebSphere JDBC Adapter

Body

 

When WebSphere JDBC Adapter accesses Oracle database to pick up the XMLType data, you may encounter the following error at IBM Business Process Manager (BPM) runtime:

com.ibm.j2ca.jdbc.JDBCRecord getNext Exception Occurred When Event is not null.

javax.resource.ResourceException: NoClassDefFoundError occur while try to read Oracle XML, please ensure the required Oracle xdb library is in the class path.

 

The above error message indicates no proper operation is found to parse the Oracle XML data. Oracle supplies xdb6.jar and xmlparserv2.jar files to use the standard JDBC4.0 java.sql.SQLXML interface and parse the XML data. The xdb6.jar can be download from the Oracle JDBC driver download site. The following download link is for Oracle database 11g:
http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html

 

Another xmlparserv2.jar file is located in Oracle_Installation/db_1/lib folder.

Besides the general JDBC driver jar file, the two additional jar files are required to be included in the class path of the Oracle JDBC Provider created on IBM Business Process Manager. Refer to the following diagram:

image

 

Create the JDBC Data Source associated with the Oracle JDBC Provider and then configure WebSphere JDBC Adapter to use this predefined Data Source in IBM Integration Designer development tool referring to following diagram:

image

 

After doing the above configurations, the following new error may be encountered while testing the scenario:

java.lang.IllegalArgumentException

         at oracle.xml.jaxp.JXTransformer.setOutputProperty(JXTransformer.java:793)

         at org.eclipse.xsd.util.DefaultJAXPConfiguration.createTransformer

  (DefaultJAXPConfiguration.java:63)

         at org.eclipse.xsd.util.XSDResourceImpl.doSerialize(XSDResourceImpl.java:153)

         at org.eclipse.xsd.util.XSDResourceImpl.serialize(XSDResourceImpl.java:136)

         at org.eclipse.xsd.ecore.XSDEcoreBuilder.setAnnotations(XSDEcoreBuilder.java:3087)

         at com.ibm.ws.bo.BOModelBuilder.access$201(BOModelBuilder.java:103)

         at com.ibm.ws.bo.BOModelBuilder$1.run(BOModelBuilder.java:1778)

         at java.security.AccessController.doPrivileged(AccessController.java:202)

         at com.ibm.ws.bo.BOModelBuilder.setAnnotations(BOModelBuilder.java:1774)

         at org.eclipse.xsd.ecore.XSDEcoreBuilder.getEPackage(XSDEcoreBuilder.java:161)

         at com.ibm.ws.bo.BOModelBuilder.getEStructuralFeature(BOModelBuilder.java:983)

         at org.eclipse.xsd.ecore.XSDEcoreBuilder.generate(XSDEcoreBuilder.java:2709)

         at com.ibm.ws.bo.BOModelBuilder.generate(BOModelBuilder.java:340)

         at com.ibm.ws.bo.BOModelBuilder.generate(BOModelBuilder.java:650)

         at com.ibm.ws.bo.BOModelBuilder.build(BOModelBuilder.java:309)

         at com.ibm.ws.bo.BOModelHolder.loadModels(BOModelHolder.java:591)

         at com.ibm.ws.bo.BOModelHolder.loadAllModels(BOModelHolder.java:626)

         at com.ibm.ws.bo.BOModelHolder.loadNamespace(BOModelHolder.java:545)

         at com.ibm.ws.bo.BOEPackageRegistry.loadEPackage(BOEPackageRegistry.java:218)

         at com.ibm.ws.bo.BOEPackageRegistry.getEPackage(BOEPackageRegistry.java:295)

 

 

The above error is caused by xmlparserv2.jar. When xmlparserv2.jar is added to the class path of JDBC Provider, it registers as an implementation of XML processing interfaces - DocumentBuilderFactory, SAXParserFactory and TransformerFactory. Due to a compatibility issue, the above error is produced when xmlparserv2.jar is registered as the TransformerFactory implementation.

 

In order to recognize the input XMLType data at runtime, you need to specify the classloader of IBM Business Process Manager to load the compatible implementation. The following two steps are required:

  1. In the BPM_Installation/java/jre/lib folder, find file jaxp.properties.sample and rename it to jaxp.properties.
  2. Edit jaxp.properties, uncomment the properties javax.xml.transform.TransformerFactory, javax.xml.parsers.SAXParserFactory, and javax.xml.parsers.DocumentBuilderFactory. Refer to following diagram:
    image
    The server of IBM Business Process Manager should be restarted after the modifications.

 

 

[{"Business Unit":{"code":"BU004","label":"Hybrid Cloud"},"Product":{"code":"","label":""},"Component":"","Platform":[{"code":"","label":""}],"Version":"","Edition":""}]

UID

ibm11080711