Search code examples
springjaxbjakarta-migration

Migrating TransformerFactory Property from javax.xml.Transform to Jakarta in Spring 6 and Java 17


We're in the process of upgrading our application to Spring 6 and Java 17 from Java 11 and Spring 5. As part of this migration, we've come across a property set:

System.setProperty("javax.xml.transform.TransformerFactory","com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl");

Despite migrating our SOAP interfaces successfully, we're unsure about the necessity of this property.

How to migrate to Jakarta?


Solution

  • Since the class javax.xml.transform.TransformerFactory is still in the java.xml JDK17 module and still referenced in the jaxb-ri 4.x (under jakarta packages), I'd suggest not to change anything.

    Same thing for com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl which is still under jdk17.