This NullPointerException appears to be coming from with the FOP
internals, but I'm unsure of what the actual cause is.  I was not
receiving this problem until I recently switched from XSLT to XSLTC, and
the problem does not always arise.  I'm caching both my compiled
templates, and my drivers, but the drivers I make sure to reset after
each use.  Just curious if someone else has come across this type of
error:

------------------------------------------------------------------------
----------------------java.lang.NullPointerException
        at
com.sfsltd.xml.FopTransformer.transform(FopTransformer.java:215)
        at
com.sfsltd.documents.ValuationDocument.buildPDF(ValuationDocument.java:2
08)
        at
com.sfsltd.utils.pnc.ValuationDocumentThread.run(ValuationDocumentThread
.java:34)
        at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecuto
r.java:779)
        at java.lang.Thread.run(Thread.java:536)
Root Cause of Exception: 
javax.xml.transform.TransformerException: java.lang.NullPointerException
        at
org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl.ja
va:712)
        at
org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl.ja
va:307)
        at
com.sfsltd.xml.FopTransformer.transform(FopTransformer.java:211)
        at
com.sfsltd.documents.ValuationDocument.buildPDF(ValuationDocument.java:2
08)
        at
com.sfsltd.utils.pnc.ValuationDocumentThread.run(ValuationDocumentThread
.java:34)
        at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecuto
r.java:779)
        at java.lang.Thread.run(Thread.java:536)
Caused by: java.lang.NullPointerException
        at
org.apache.fop.render.pdf.FontSetup.addToResources(FontSetup.java:240)
        at
org.apache.fop.render.pdf.PDFRenderer.stopRenderer(PDFRenderer.java:249)
        at
org.apache.fop.apps.StreamRenderer.stopRenderer(StreamRenderer.java:204)
        at
org.apache.fop.fo.FOTreeBuilder.endDocument(FOTreeBuilder.java:246)
        at
org.apache.xml.serializer.ToXMLSAXHandler.endDocument(ToXMLSAXHandler.ja
va:222)
        at com.sfsltd.documents.xsl.valuation.transform()
        at
org.apache.xalan.xsltc.runtime.AbstractTranslet.transform(AbstractTransl
et.java:545)
        at
org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl.ja
va:702)
        ... 6 more
---------
java.lang.NullPointerException
        at
org.apache.fop.render.pdf.FontSetup.addToResources(FontSetup.java:240)
        at
org.apache.fop.render.pdf.PDFRenderer.stopRenderer(PDFRenderer.java:249)
        at
org.apache.fop.apps.StreamRenderer.stopRenderer(StreamRenderer.java:204)
        at
org.apache.fop.fo.FOTreeBuilder.endDocument(FOTreeBuilder.java:246)
        at
org.apache.xml.serializer.ToXMLSAXHandler.endDocument(ToXMLSAXHandler.ja
va:222)
        at com.sfsltd.documents.xsl.valuation.transform()
        at
org.apache.xalan.xsltc.runtime.AbstractTranslet.transform(AbstractTransl
et.java:545)
        at
org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl.ja
va:702)
        at
org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl.ja
va:307)
        at
com.sfsltd.xml.FopTransformer.transform(FopTransformer.java:211)
        at
com.sfsltd.documents.ValuationDocument.buildPDF(ValuationDocument.java:2
08)
        at
com.sfsltd.utils.pnc.ValuationDocumentThread.run(ValuationDocumentThread
.java:34)
        at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecuto
r.java:779)
        at java.lang.Thread.run(Thread.java:536)
Orig Stack Trace: 
com.sfsltd.xml.FopTransformer.transform(FopTransformer.java:215)
com.sfsltd.documents.ValuationDocument.buildPDF(ValuationDocument.java:2
08)
com.sfsltd.utils.pnc.ValuationDocumentThread.run(ValuationDocumentThread
.java:34)
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecuto
r.java:779)
java.lang.Thread.run(Thread.java:536)
------------------------------------------------------------------------
----------------------

I can attach my implementation if necessary.


_________________________________
Jeremy Nix
Southwest Financial Services, LTD.
[EMAIL PROTECTED]
(513) 621-6699 ext.1158

Reply via email to