xml-xalan-j-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Jones <richard.d.jo...@hp.com>
Subject newTransformer returns null
Date Tue, 24 Jun 2008 15:54:08 GMT
Hi Folks,

I'm having a problem with the following code:

TransformerFactory tFactory = TransformerFactory.newInstance();
Reader reader = new
StreamSource xslt = new StreamSource(reader);
Transformer transformer = tFactory.newTransformer(xslt);

and am finding that "transformer" is null.  This is confusing, as the
javadocs are explicit on the subject:


public abstract Transformer <http://xml.apache.org/xalan-j/apidocs/javax/xml/transform/Transformer.html>
*newTransformer*(Source <http://xml.apache.org/xalan-j/apidocs/javax/xml/transform/Source.html>
                                    throws TransformerConfigurationException <http://xml.apache.org/xalan-j/apidocs/javax/xml/transform/TransformerConfigurationException.html>

        A |Transformer| object that may be used to perform a
        transformation in a single |Thread|, never |null|.

Am I missing something, or is this a bug?  What problems with my code
might be able to generate this null?  The specified file does exist, and
as far as I can tell everything up to the last line is working fine.

I'm at a bit of a loss to know where to go next with this, so any help
gratefully appreciated,



View raw message