2010-09-25 140 views
2

我將在我的JSF 2.0項目中使用Saxon-B 9。但是,增加的依賴撒克遜&後撒克遜-DOM異常開始出現在啓動時:JSF 2.0和TransformerFactory

Sep 25, 2010 6:05:45 PM com.google.apphosting.utils.jetty.JettyLogger info INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger Sep 25, 2010 6:05:45 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml INFO: Successfully processed /home/chardex/projects/metabus/trunk/clients/export/target/articats/export_exploded/WEB-INF/appengine-web.xml Sep 25, 2010 6:05:45 PM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml INFO: Successfully processed /home/chardex/projects/metabus/trunk/clients/export/target/articats/export_exploded/WEB-INF/web.xml Sep 25, 2010 6:05:45 PM com.google.apphosting.utils.jetty.JettyLogger info INFO: jetty-6.1.x Sep 25, 2010 6:05:46 PM com.sun.faces.config.ConfigureListener contextInitialized INFO: Initializing Mojarra 2.0.0 (RC2 b22) for context '' Sep 25, 2010 6:05:48 PM com.sun.faces.config.ConfigManager initialize INFO: Unsanitized stacktrace from failed start... > com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: java.lang.NoSuchMethodError: net.sf.saxon.dom.NodeWrapper$ChildEnumeration.isAtomizing()Z at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:670) at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:306) at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:219) at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548) at org.mortbay.jetty.servlet.Context.startContext(Context.java:136) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130) at org.mortbay.jetty.Server.doStart(Server.java:224) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:185) at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:147) at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:219) at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:164) at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48) at com.google.appengine.tools.development.DevAppServerMain.(DevAppServerMain.java:113) at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:89) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:115) Caused by: java.util.concurrent.ExecutionException: java.lang.NoSuchMethodError: net.sf.saxon.dom.NodeWrapper$ChildEnumeration.isAtomizing()Z at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252) at java.util.concurrent.FutureTask.get(FutureTask.java:111) at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:668) ... 25 more Caused by: java.lang.NoSuchMethodError: net.sf.saxon.dom.NodeWrapper$ChildEnumeration.isAtomizing()Z at net.sf.saxon.dom.NodeWrapper$ChildEnumeration.(NodeWrapper.java:1079) at net.sf.saxon.dom.NodeWrapper.iterateAxis(NodeWrapper.java:722) at net.sf.saxon.instruct.ApplyTemplates.defaultAction(ApplyTemplates.java:375) at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:333) at net.sf.saxon.Controller.transformDocument(Controller.java:1807) at net.sf.saxon.Controller.transform(Controller.java:1621) at com.sun.faces.config.ConfigManager$ParseTask.getDocument(ConfigManager.java:906) at com.sun.faces.config.ConfigManager$ParseTask.call(ConfigManager.java:831) at com.sun.faces.config.ConfigManager$ParseTask.call(ConfigManager.java:787) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:656) ... 25 more Sep 25, 2010 6:05:48 PM com.google.apphosting.utils.jetty.JettyLogger warnwarn

但我仍然不使用庫,並且不明白爲什麼JSF開始它的使用它。我嘗試從saxon jar中刪除文件javax.xml.transform.TransformerFactory,但它沒有幫助。

+0

它修復瞭如果以參數-Djavax.xml.transform.TransformerFactory =「com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl」開頭。但是如何在配置文件或Google App Engine中設置? – chardex 2010-09-25 18:49:08

回答

2

Saxon已經在類路徑中,但您顯然已將過期的版本添加到缺少NoSuchMethodError消息中提及的方法的類路徑中。

可能撒克遜已經是類路徑中的標準庫之一。撒克遜是JAXP實現之一。 JSF利用JAXP來解析faces-config.xml文件。

要解決這個問題,只需從你手動添加到類路徑的類路徑中刪除過時的Saxon版本,它應該可以工作。