使用Weblogic 12.1.2我试图在解析XSL时使用下面的代码我收到以下错误,
TransformerFactory tFactory = new TransformerFactoryImpl();
Source xslSource = new javax.xml.transform.stream.StreamSource(myXslfile);
Transformer transformer = tFactory.newTransformer(xslSource);
StringReader reader = new StringReader(xmlFile);
StringWriter writer = new StringWriter();
transformer.transform(new javax.xml.transform.stream.StreamSource(reader),
new javax.xml.transform.stream.StreamResult(writer));
异常
net.sf.saxon.trans.XPathException:
org.xml.sax.SAXParseException;org.xml.sax.SAXParseException; lineNumber: 12;
columnNumber: 58;
at net.sf.saxon.event.Sender.sendSAXSource(Sender.java:418)
at net.sf.saxon.event.Sender.send(Sender.java:214)
at net.sf.saxon.event.Sender.send(Sender.java:50)
at net.sf.saxon.Controller.transform(Controller.java:1611)
如果我单独运行,那么同样的代码工作正常但是一旦在Weblogic服务器中部署为war它就无法运行并抛出此异常。请建议有什么方法可以解决这个问题