Bug 32193 - NullPointerException when using non-Apache XML parser (Xerces) and/or JXTransformer
Summary: NullPointerException when using non-Apache XML parser (Xerces) and/or JXTrans...
Status: CLOSED INVALID
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: general (show other bugs)
Version: 0.20.5
Hardware: Other Linux
: P3 critical
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-11 20:50 UTC by D. Robert Adams
Modified: 2012-04-01 13:53 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description D. Robert Adams 2004-11-11 20:50:05 UTC
On my cite we had an XML parser created by Oracle
(oracle.xml.parser.v2.SAXParser) installed in the system, so FOP was picking it
up and using it before it found Xerces.  Same for the JXTransformer class in
oracle.xml.jaxp.JXTransformer.  This created a NullPointerException in
JXTransformer.reportXSLException().

My kludge solution was to modify fop.sh and to include both xercesImpl.jar and
xalan.jar in -Xbootclasspath/p: (so they are searched before ANY other JARs). 
This eliminated the NullPointerException and everything worked perfectly.

In this bugzilla form I listed this under with OS Linux, but I suspect it would
produce the same effects on any other system where Xerces and Xalan aren't found
first.
Comment 1 Glen Mazza 2004-11-11 22:32:33 UTC
I'm not sure what FOP can do here to fix this problem; we don't code the Oracle
parsers, and the choosing of the specific XML libraries is done by the Java
classloader, not FOP.

There are buggy versions of Xalan and Xerces that will also create NPE's; our
solution in these cases are to recommend the user replace those libraries with
more recent versions from the Xalan / Xerces web sites.

Glen
Comment 2 Glenn Adams 2012-04-01 13:53:36 UTC
batch transition to closed remaining pre-FOP1.0 resolved bugs