I have just attempted to deploy onto Heroku a change to my Java 8 application, which includes an XSL transformation. The deploy fails because the Maven build fails, with the message:
cannot find symbol symbol: method newDefaultInstance() location: class javax.xml.transform.TransformerFactory
As far as I know, the standard way to do an XSL transformation is to create a TransformerFactory using the above method, then use that to create a Transformer with the XSL stylesheet, then use the Transformer to process the XML document that needs to be transformed. (See https://docs.oracle.com/javase/8/docs/api/javax/xml/transform/package-summary.html)
The code I have written to do this compiles and runs successfully in my local environment, so I don't understand why it doesn't work on Heroku. Is it using a different (non-standard) Java 8 JDK?
Or is there a better way to do what I want?