-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
Make XMLInputFactory
configurable.
#77
Comments
Thanks for your report! Please ensure you have provided enough info in order to recreate the issue, including the problematic ODS File. |
Looks like the 3rd option is the best one. That's assuming this flag doesn't affect the existing usage. I guess not, otherwise we should be able to see it at unit tests. Nevertheless, you said the flag should be set to true. But previously, in your workaround, you set the flag to false... Should it not be false? |
I've submitted a pull request to address this change: #78
A correction is needed: to disable validation, set it to |
@miachm I've rebased the PR onto the master branch. |
Fixes #77 Disable DTD support on XMLInputFactory.
We require the
XMLInputFactory
configuration capability as described in #39.Context
Our application is deployed on JBoss EAP, which incorporates Woodstox as its StAX implementation. While attempting to parse .ods files with a Dtd declared in metadata.xml (which was generated by using JasperReports) like the following:
We encountered the following exception:
Please note that the exception above occurred due to this StAX implementation trying to validate the XML against the missed DTD resource, and this issue has been encountered during the process of reading and parsing the .ods file.
Workaround
I can verify that when we follow the provided instructions to configure Woodstox not to perform validation, the .ods file can be successfully read:
Discussion
Exploring ways to extend
XMLInputFactory
customization:ServiceLoader
mechanism as demonstrated below:Or we can simply apply the mentioned patch directly to set
XMLInputFactory.SUPPORT_DTD
totrue
. This adjustment will ensure that JasperReports-generated ODS files function correctly on JBoss EAP without affecting any existing usages.Are there any alternative approaches that should be considered?
The text was updated successfully, but these errors were encountered: