Thursday, June 7, 2007

Oracle 10g release 2 XML parser hacks and Spring framework

The Oracle 10g release 2 supports only JDK 1.4.x and both Oracle XML Parser and Sun's parser have issues in loading Spring framework 2.0 application context xml files particularly Spring Webflow 1.0.3.

The exception that arises out of buggy XML parser is given below:

oracle.xml.parser.schema.XSDException: Duplicated definition for: 'identifiedType'

The configuration change in opmn.xml in the diagram shown above seems to work just fine. The example OC4J application component instance shown is app1.

Sourcing xerces-2.6.2.jar and xml-apis.jar in the application's bootclasspath level overrides the Oracle's buggy XML parser while starting the application component instance.

Alternate way to circumvent the Oracle XML parser issue is by putting xerces-2.6.2.jar and xml-apis.jar in $ORACLE_HOME/jdk/jre/lib/ext. However this may void Oracle's application server support if the enterprise has purchased support from Oracle since they do not support their clients to hack Oracle controlled JDK environment.