-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Unable to create XsltPayloadTransformer when Saxon HE is in the classpath. #2723
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
Comments
I think the store is about:
exactly in the As a workaround you can inject |
Maybe the following method could be added to (spring-ws) TransformerFactoryUtils :
Then XsltPayloadTransformer.onInit() can be factored this way :
Hence the unsupported properties will be ignored (with warning) in a centralized manner. |
I factored
so, no need to add anything new to S-WS. |
Fixes spring-projects#2723 Not all XML components support all the configuration properties. For example Saxon HE doesn't support `XMLConstants.ACCESS_EXTERNAL_DTD` and end up with an exception like: `IllegalArgumentException: Unknown configuration property http://javax.xml.XMLConstants/property/accessExternalDTD` * Change `XsltPayloadTransformer` to re-use `TransformerFactoryUtils` from spring-ws as a centralized source of `TransformerFactory` configuration. * Wrap `XMLConstants.ACCESS_EXTERNAL_STYLESHEET` to the `try..catch` and log INFO about not supported property **Cherry-pick to 5.0.x & 4.3.x**
Fixes #2723 Not all XML components support all the configuration properties. For example Saxon HE doesn't support `XMLConstants.ACCESS_EXTERNAL_DTD` and end up with an exception like: `IllegalArgumentException: Unknown configuration property http://javax.xml.XMLConstants/property/accessExternalDTD` * Change `XsltPayloadTransformer` to re-use `TransformerFactoryUtils` from spring-ws as a centralized source of `TransformerFactory` configuration. * Wrap `XMLConstants.ACCESS_EXTERNAL_STYLESHEET` to the `try..catch` and log INFO about not supported property **Cherry-pick to 5.0.x & 4.3.x**
Fixes #2723 Not all XML components support all the configuration properties. For example Saxon HE doesn't support `XMLConstants.ACCESS_EXTERNAL_DTD` and end up with an exception like: `IllegalArgumentException: Unknown configuration property http://javax.xml.XMLConstants/property/accessExternalDTD` * Change `XsltPayloadTransformer` to re-use `TransformerFactoryUtils` from spring-ws as a centralized source of `TransformerFactory` configuration. * Wrap `XMLConstants.ACCESS_EXTERNAL_STYLESHEET` to the `try..catch` and log INFO about not supported property **Cherry-pick to 5.0.x & 4.3.x**
Fixes #2723 Not all XML components support all the configuration properties. For example Saxon HE doesn't support `XMLConstants.ACCESS_EXTERNAL_DTD` and end up with an exception like: `IllegalArgumentException: Unknown configuration property http://javax.xml.XMLConstants/property/accessExternalDTD` * Change `XsltPayloadTransformer` to re-use `TransformerFactoryUtils` from spring-ws as a centralized source of `TransformerFactory` configuration. * Wrap `XMLConstants.ACCESS_EXTERNAL_STYLESHEET` to the `try..catch` and log INFO about not supported property **Cherry-pick to 5.0.x & 4.3.x**
Affects Version(s): 4.3.19.RELEASE
After upgrading to spring-integration-xml:4.3.19.RELEASE (from 4.3.18.RELEASE), my application failed to start with the following exception :
The cause of the exception seems to be related to the following changes
The TransformerFactoryUtils.newInstance() force the XMLConstants.ACCESS_EXTERNAL_DTD property which doesn't seems to be supported by Saxon. If I quote answers from Michael Kay about similar subject, I understand that Saxon does not handle Xml Parser related properties.
As the problem is related to a third party dependency, I provide a side sample project as a regression test case
The text was updated successfully, but these errors were encountered: