Skip to content

XPathMessageSplitter Not supported: http://javax.xml.XMLConstants/property/accessExternalDTD #2993

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

Closed
jasonparallel opened this issue Jul 19, 2019 · 4 comments
Assignees
Milestone

Comments

@jasonparallel
Copy link

jasonparallel commented Jul 19, 2019

Affects Version(s):4.3.20.RELEASE

Same issue as #2723 but using XPathMessageSplitter.

Caused by: java.lang.IllegalArgumentException: Not supported: http://javax.xml.XMLConstants/property/accessExternalDTD
	at org.apache.xalan.processor.TransformerFactoryImpl.setAttribute(TransformerFactoryImpl.java:571)
	at org.springframework.xml.transform.TransformerFactoryUtils.defaultSettings(TransformerFactoryUtils.java:56)
	at org.springframework.xml.transform.TransformerFactoryUtils.newInstance(TransformerFactoryUtils.java:32)
	at org.springframework.integration.xml.splitter.XPathMessageSplitter.<init>(XPathMessageSplitter.java:109)
@jasonparallel
Copy link
Author

There appears to be a fix for this in 3.0.7 of spring-ws TransformerFactoryUtils but not the 2.4 line

@artembilan
Copy link
Member

OK. Since there is not going to be a fix in Spring WS 2.4.x, I'm going to go ahead and cover all the TransformerFactoryUtils.newInstance() failures here in Spring Integration.
At least for the mentioned version 4.3.x: all others are covered by Spring WS 3.0.7.

@artembilan
Copy link
Member

@gregturn,

This is one more concern from community about unstable TransformerFactoryUtils logic.
May it is time to fix it in the Spring WS 2.4.x and release for upcoming Spring Boot 1.5.x ?

Meanwhile I just copy/paste your class from the master...

Thanks

artembilan added a commit to artembilan/spring-integration that referenced this issue Jul 19, 2019
Fixes spring-projects#2993

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`

* Copy `TransformerFactoryUtils` from the latest Spring WS, where
all the attributes are wrapped into `try..catch` and warn log.
And use this new class everywhere instead of non-patched in Spring WS
* Upgrade to the latest Spring WS 2.4.5
garyrussell pushed a commit that referenced this issue Jul 22, 2019
Fixes #2993

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`

* Copy `TransformerFactoryUtils` from the latest Spring WS, where
all the attributes are wrapped into `try..catch` and warn log.
And use this new class everywhere instead of non-patched in Spring WS
* Upgrade to the latest Spring WS 2.4.5
@artembilan
Copy link
Member

Fixed via: #2994

@artembilan artembilan added this to the 4.3.21 milestone Jul 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants