Bug #5306
closedSaxon 11.1 breaks my code (SAXParserFactory.newInstance() problem is back)
0%
Description
In Configuration.init() a CatalogResourceResolver is created:
commonResolver = new CatalogResourceResolver();
This leads to
SAXParserFactory.newIntance()
in org.xmlresolver.cache.ResourceCache, which looks at the global system property
"javax.xml.parsers.SAXParserFactory".
I have to use the global property for other parts in my source code (set to org.apache.xerces.jaxp.SAXParserFactoryImpl), and up to now Saxon was neglecting the property.
I thought JAXP and global properties are considered "evil"?
Any ideas how I can solve the problem?
Here is the stack:
InvocationTargetException Provider org.apache.xerces.jaxp.SAXParserFactoryImpl not found java.xml/javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:195) java.xml/javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:147) java.xml/javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:227) java.xml/javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:181) org.xmlresolver.cache.ResourceCache.(ResourceCache.java:189) org.xmlresolver.XMLResolverConfiguration.getFeature(XMLResolverConfiguration.java:971) org.xmlresolver.CatalogResolver.(CatalogResolver.java:51) org.xmlresolver.Resolver.(Resolver.java:63) net.sf.saxon.lib.CatalogResourceResolver.(CatalogResourceResolver.java:46) net.sf.saxon.Configuration.init(Configuration.java:366) net.sf.saxon.Configuration.(Configuration.java:229) java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
Related issues
Please register to edit this issue