gpt4 book ai didi

java - JSF 2.0 和 TransformerFactory

转载 作者:行者123 更新时间:2023-11-30 09:53:28 24 4
gpt4 key购买 nike

我打算在我的 JSF 2.0 项目中使用 Saxon-B 9。但是在添加对 Saxon & Saxon-dom 的依赖后,异常开始出现在启动时:

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,但没有帮助。

最佳答案

Saxon 已经在类路径中,但您显然向类路径添加了一个过时的版本,该版本缺少 NoSuchMethodError 消息中提到的方法。

可能 Saxon 已经在类路径中的标准库中。 Saxon 是 JAXP 实现之一。 JSF 利用 JAXP 来解析 faces-config.xml 文件。

要解决此特定问题,只需从您手动添加到类路径的类路径中删除过时版本的 Saxon,它应该可以工作。

关于java - JSF 2.0 和 TransformerFactory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3794951/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com