在wildfly 14中应用xslt时遇到以下错误。有时它成功转换了xml,有时出现了以下错误。
Caused by: java.lang.ClassCastException: org.apache.xml.dtm.ref.DTMManagerDefault cannot be cast to org.apache.xml.dtm.DTMManager
at org.apache.xml.dtm.DTMManager.newInstance(DTMManager.java:137)
at org.apache.xpath.XPathContext.<init>(XPathContext.java:102)
at org.apache.xpath.XPathContext.<init>(XPathContext.java:349)
at org.apache.xpath.XPathContext.<init>(XPathContext.java:337)
at org.apache.xalan.transformer.TransformerImpl.<init>(TransformerImpl.java:397)
at org.apache.xalan.templates.StylesheetRoot.newTransformer(StylesheetRoot.java:200)
我在pom.xml文件中添加了以下依赖项
<dependency>
<groupId>xalan</groupId>
<artifactId>xalan</artifactId>
<version>2.7.1</version>
</dependency>