-
Notifications
You must be signed in to change notification settings - Fork 316
add try-catch-block for XMLConstants.ACCESS_EXTERNAL_DTD #128
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
Conversation
The XMLConstants.ACCESS_EXTERNAL_DTD property is not supported by every XML library. Since 3.0.6 I get this error: ContextLoader.initWebApplicationContext:312 - Context initialization failed java.lang.IllegalArgumentException: Unrecognized configuration feature: http://javax.xml.XMLConstants/property/accessExternalDTD at net.sf.saxon.Configuration.setConfigurationProperty(Configuration.java:4387) at net.sf.saxon.jaxp.SaxonTransformerFactory.setAttribute(SaxonTransformerFactory.java:311) at org.springframework.xml.transform.TransformerFactoryUtils.defaultSettings(TransformerFactoryUtils.java:53) at org.springframework.xml.transform.TransformerFactoryUtils.newInstance(TransformerFactoryUtils.java:32) at org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping.<clinit>(PayloadRootAnnotationMethodEndpointMapping.java:58)
Superceded by #129. You can try my patch with |
For reference, 3.0.6 doesn't work with Xalan either:
|
Have you tried 3.0.7.BUILD-SNAPSHOT @tan9? |
@gregturn I haven't. We ended up removing Xalan from classpath (which is a transitive dependency of batik-dom). However the change you made seems reasonable. 👍 |
i did recently upgrade the spring-ws version due to security issue cve-2019-3773 to 2.4.4 afterwards i started seeing the below startup error for Weblogic 12.1.1/Jdk 1.6 , Is there an way we can resolve or apply this patch to 2.4.x version ? Caused By: java.lang.IllegalArgumentException: TransformerFactory does not recognise attribute 'http://javax.xml.XMLConstants/property/accessExternalDTD'. |
Check 2.4.5.release. |
Yes i have tried that even 2.4.5 does not handle the IllegalArgumentException which leads to an runtime error during startup. Looks like TransformerFactoryImpl from JDK 6 does not support this property only JDK 7 does but the spring-ws 2.4 is compatible with JDK 6 as per the doc |
The XMLConstants.ACCESS_EXTERNAL_DTD property is not supported by every
XML library.
Since 3.0.6 I get this error: