If a ...jre/lib/jaxp.properties file exists with the following entries:
#javax.xml.transform.TransformerFactory=org.apache.xalan.xsltc.trax.TransformerFactoryImpl
#javax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl
javax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl
javax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
transformations fail with an error message indicating an NPE for the
TranformerFactoryImpl.
javax.xml.transform.TransformerFactoryConfigurationError: Provider null could
not be instantiated: java.lang.NullPointerException
Of course, if I uncomment the first or second line there's no problem.
The problem has nothing to do with the commented lines. If I delete
them, the problem still happens. In the same context, if I delete the
jaxp.properties file all together, there is no problem.
It seems that if you have a jaxp.properties file, it must define ALL of the jaxp properties. The JAXP spec describes an ordered process for determining what factory implementations to use. For any one property it should go to the next tier if it doesn't find a definition in a higher tier.
#javax.xml.transform.TransformerFactory=org.apache.xalan.xsltc.trax.TransformerFactoryImpl
#javax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl
javax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl
javax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
transformations fail with an error message indicating an NPE for the
TranformerFactoryImpl.
javax.xml.transform.TransformerFactoryConfigurationError: Provider null could
not be instantiated: java.lang.NullPointerException
Of course, if I uncomment the first or second line there's no problem.
The problem has nothing to do with the commented lines. If I delete
them, the problem still happens. In the same context, if I delete the
jaxp.properties file all together, there is no problem.
It seems that if you have a jaxp.properties file, it must define ALL of the jaxp properties. The JAXP spec describes an ordered process for determining what factory implementations to use. For any one property it should go to the next tier if it doesn't find a definition in a higher tier.