-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible ClassCastException when createXMLResource() uses xerces #187
Comments
sosnut
added a commit
to sosnut/openhtmltopdf
that referenced
this issue
Mar 28, 2018
…n and adding a way to bypass it Specifying "com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl" as the default DocumentBuilderFactory, in BaseRendererBuilder. (This is the factory that is used by default, but an application may depend on an other parser which could provide an incompatible builder factory). Adding method useDocumentBuilderFactoryImplementationClass(), to be able to use another implementation (or the DocumentBuilderFactory currently available in the application, if null is passed) if necessary.
danfickle
added a commit
that referenced
this issue
Mar 29, 2018
#187 Specifying default DocumentBuilderFactory implementation and add way to bypass.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When xerces is used in the application, createXMLResource() can send the following exception:
org.apache.xerces.parsers.XIncludeAwareParserConfiguration cannot be cast to org.apache.xerces.xni.parser.XMLParserConfiguration
(Observed with Oracle Jdk 1.8.0_66, openhtmltopdf 0.0.1-RC12).
By default openhtmltopdf does not use xerces (but in some cases it seems to pick xerces implementation of
DocumentBuilderFactory
if it's used elsewhere in the application; I suppose it would be better to use the internal JAXP implementation from com.sun.org.apache.xerces.internal.jaxp unless specified otherwise – since xerces is quite old now).This issue seems similar to issue #54 (except that Xerces is involved instead of Xalan).
(The problem can happen for example when the application uses spring-security-saml 1.0.3 – which depends on xerces 2.10.0)
The text was updated successfully, but these errors were encountered: