Skip to content

TransformerFactoryUtils introduced in release 3.0.6 sets default properties that conflict with other TransformerFactory implementations [SWS-1054] #1120

@gregturn

Description

@gregturn

Geert Graat opened SWS-1054 and commented

We recently upgraded to Spring WS 3.0.6. In this release, a new class is introduced, TransformerFactoryUtils (1f05307), which before instantiating a TransformerFactory sets some defaults. 

The problem we have with this is that we do not use the default TransformerFactory implementation, but instead rely on the Saxon-HE library. When this TransformerFactory is instantiated, setting the defaults lead to an exception:

 

Caused by: java.lang.IllegalArgumentException: Unrecognized configuration feature: http://javax.xml.XMLConstants/property/accessExternalDTDCaused by: java.lang.IllegalArgumentException: Unrecognized configuration feature: http://javax.xml.XMLConstants/property/accessExternalDTD at deployment.runtime.war//net.sf.saxon.Configuration.setConfigurationProperty(Configuration.java:4408) at deployment.runtime.war//net.sf.saxon.jaxp.SaxonTransformerFactory.setAttribute(SaxonTransformerFactory.java:311) at deployment.runtime.war//org.springframework.xml.transform.TransformerFactoryUtils.defaultSettings(TransformerFactoryUtils.java:53) at deployment.runtime.war//org.springframework.xml.transform.TransformerFactoryUtils.newInstance(TransformerFactoryUtils.java:32)

This prevents our application from starting up.

 


Affects: 3.0.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions