Hi Sergey

I tried with the latest 2.4.x as well as 2.5.x versions, without any success
:-(.

As you suggested it , I also wrote a simple test class to ensure Xalan was
able to transform my xml:

private static File XSLT = new File("src/main/resources/mytemplate.xsl");
private static File XML = new File("test/xml/sample.xml");
...     
TransformerFactory transFact = TransformerFactory.newInstance( );
InputStream xsltIs = new FileInputStream(XSLT);
Source xsltSource = new StreamSource(xsltIs);
Transformer trans = transFact.newTransformer(xsltSource);
InputStream xmlIs = new FileInputStream(XML);
Source xmlSource = new StreamSource(xmlIs);
Writer w = new PrintWriter(System.out);
Result result = new StreamResult(w);
trans.transform(xmlSource, result);

And the transformation is running fine
(but here, the xml is static, coming from a flat file - isof coming as jaxb
output).

I finally tried to use different XSLT implementation, ie Saxon (using
-Djavax.xml.transform.TransformerFactory=net.sf.saxon.TransformerFactoryImpl),
but I got another error:

javax.xml.transform.TransformerConfigurationException: Templates object was
not created by Saxon
        at
net.sf.saxon.TransformerFactoryImpl.newTransformerHandler(TransformerFactoryImpl.java:420)
        at
org.apache.cxf.jaxrs.provider.XSLTJaxbProvider.marshalToOutputStream(XSLTJaxbProvider.java:214)


So up to now, no real fix or workaround :-(

Bernard.







--
View this message in context: 
http://cxf.547215.n5.nabble.com/Strange-NPE-with-XSLTJaxbProvider-tp5713703p5713747.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to