gpt4 book ai didi

java - Struts 1.3.10 Digester.getParser() UnsupportedOperationException

转载 作者:行者123 更新时间:2023-12-01 07:16:02 27 4
gpt4 key购买 nike

我正在尝试使用 OC4J 版本 10.1.3.5 启动 Struts 1.X(版本 1.3.10)应用程序。应用程序设法初始化所有Spring bean,包括action-servlet.xml 中定义的Struts Actions。然而,一旦所有的 bean 都被初始化,我就会在日志中得到一个相当难看的异常。

我怀疑 xalan (2.7.1)、xercesImpl (2.9.1) 或 xml-apis (1.3.04) 存在问题,但所有这些都使用最新版本。异常表明可能缺少依赖项,但我无法确定它可能是什么。

感谢任何帮助。 (注意:我目前无法更新到 Struts 2.X。该应用程序是旧版应用程序,可能会被替换)。

 Digester.getParser:                                                                             08:18:10,794 ERROR Digester(789)
java.lang.UnsupportedOperationException: This parser does not support specification "null" version "null"
at javax.xml.parsers.SAXParserFactory.setXIncludeAware(SAXParserFactory.java:390)
at org.apache.commons.digester.Digester.getFactory(Digester.java:534)
at org.apache.commons.digester.Digester.getParser(Digester.java:786)
at org.apache.commons.digester.Digester.getXMLReader(Digester.java:1058)
at org.apache.commons.digester.Digester.parse(Digester.java:1887)
at org.apache.struts.action.ActionServlet.initServlet(ActionServlet.java:1785)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:349)
at javax.servlet.GenericServlet.init(GenericServlet.java:256)
at com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.java:2528)
at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:5006)
at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4930)
at com.evermind.server.http.HttpApplication.initPreloadServlets(HttpApplication.java:5118)
at com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:1283)
at com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:848)
at com.evermind.server.ApplicationStateRunning.getHttpApplication(ApplicationStateRunning.java:435)
at com.evermind.server.Application.getHttpApplication(Application.java:592)
at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.createHttpApplicationFromReference(HttpSite.java:2280)
at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.<init>(HttpSite.java:2199)
at com.evermind.server.http.HttpSite.initApplications(HttpSite.java:701)
at com.evermind.server.http.HttpSite.setConfig(HttpSite.java:308)
at com.evermind.server.http.HttpServer.setSites(HttpServer.java:280)
at com.evermind.server.http.HttpServer.setConfig(HttpServer.java:180)
at com.evermind.server.ApplicationServer.initializeHttp(ApplicationServer.java:2541)
at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:1058)
at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:131)
at java.lang.Thread.run(Thread.java:595)
Unable to initialize Struts ActionServlet due to an unexpected exception or error thrown, so marking the servlet as unavailable. Most likely, this is due to an incorrect or missing library dependency. 08:18:10,802 ERROR ActionServlet(398)
java.lang.NullPointerException
at org.apache.commons.digester.Digester.getXMLReader(Digester.java:1058)
at org.apache.commons.digester.Digester.parse(Digester.java:1887)
at org.apache.struts.action.ActionServlet.initServlet(ActionServlet.java:1785)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:349)
at javax.servlet.GenericServlet.init(GenericServlet.java:256)
at com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.java:2528)
at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:5006)
at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4930)
at com.evermind.server.http.HttpApplication.initPreloadServlets(HttpApplication.java:5118)
at com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:1283)
at com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:848)
at com.evermind.server.ApplicationStateRunning.getHttpApplication(ApplicationStateRunning.java:435)
at com.evermind.server.Application.getHttpApplication(Application.java:592)
at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.createHttpApplicationFromReference(HttpSite.java:2280)
at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.<init>(HttpSite.java:2199)
at com.evermind.server.http.HttpSite.initApplications(HttpSite.java:701)
at com.evermind.server.http.HttpSite.setConfig(HttpSite.java:308)
at com.evermind.server.http.HttpServer.setSites(HttpServer.java:280)
at com.evermind.server.http.HttpServer.setConfig(HttpServer.java:180)
at com.evermind.server.ApplicationServer.initializeHttp(ApplicationServer.java:2541)
at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:1058)
at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:131)
at java.lang.Thread.run(Thread.java:595)
Digester.getParser: 08:18:20,228 ERROR Digester(789)
java.lang.UnsupportedOperationException: This parser does not support specification "null" version "null"
at javax.xml.parsers.SAXParserFactory.setXIncludeAware(SAXParserFactory.java:390)
at org.apache.commons.digester.Digester.getFactory(Digester.java:534)
at org.apache.commons.digester.Digester.getParser(Digester.java:786)
at org.apache.commons.digester.Digester.getXMLReader(Digester.java:1058)
at org.apache.commons.digester.Digester.parse(Digester.java:1887)
at org.apache.struts.action.ActionServlet.initServlet(ActionServlet.java:1785)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:349)
at javax.servlet.GenericServlet.init(GenericServlet.java:256)
at com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.java:2528)
at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:5006)
at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4930)
at com.evermind.server.http.HttpApplication.getRequestDispatcher(HttpApplication.java:3139)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:775)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:458)
at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:226)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:127)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:116)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:234)
at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:29)
at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:879)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
Unable to initialize Struts ActionServlet due to an unexpected exception or error thrown, so marking the servlet as unavailable. Most likely, this is due to an incorrect or missing library dependency. 08:18:20,231 ERROR ActionServlet(398)
java.lang.NullPointerException
at org.apache.commons.digester.Digester.getXMLReader(Digester.java:1058)
at org.apache.commons.digester.Digester.parse(Digester.java:1887)
at org.apache.struts.action.ActionServlet.initServlet(ActionServlet.java:1785)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:349)
at javax.servlet.GenericServlet.init(GenericServlet.java:256)
at com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.java:2528)
at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:5006)
at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4930)
at com.evermind.server.http.HttpApplication.getRequestDispatcher(HttpApplication.java:3139)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:775)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:458)
at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:226)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:127)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:116)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:234)
at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:29)
at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:879)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)

最佳答案

当我尝试使用 xml 架构验证 xml 文件时,我遇到了这个问题。我用谷歌搜索并找到了这个问题的根本原因。

Jar 文件,例如 xerces-2.6.2.jar、crimson.jar、xalan.jarjaxp.jar 具有旧版本的 SAXParserFactory。所以上面所有的jar文件应该从类 parh 中删除。

根据具有正确版本的 jar 删除或更新 jar。

关于java - Struts 1.3.10 Digester.getParser() UnsupportedOperationException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2102594/

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