Java:哪个 Apache Digester 类? [英] Java: Which Apache Digester Class?
问题描述
我正在支持一个无法启动的 Web 应用程序/Java servlet.结果证明该问题是一个相对简单的 java.lang.NoClassDefFoundError
异常,由 org.apache.webapp.balancer.RulesParser
抛出.
I'm supporting a web application / Java servlet that has been failing to start. The issue turns out to be a relatively straight-forward java.lang.NoClassDefFoundError
exception, thrown by org.apache.webapp.balancer.RulesParser
.
抛出异常的过滤器类期望包中存在Digester
类:
The filter class that throws the exception expects the Digester
class to exist in the package:
org/apache/tomcat/util/digester
应用程序库中似乎不存在该包,但在以下位置有该类的实例:
That package doesn't appear to exist in the application lib, but there is an instance of the class in:
org/apache/commons/digester
这是我们当前应用程序/项目的的一部分.这两个类都扩展了 org.xml.sax.helpers.DefaultHandler
所以我假设它们是同一个类(但可能不同的日期/版本)?
Which is part of our current application / project. Both of the classes extend org.xml.sax.helpers.DefaultHandler
so I'm assuming they are the same class (but probably different dates / versions)?
catalina-balancer.jar
中存在RulesParser类(我没有源码),所以不能直接改包导入.
The RulesParser class exists in the catalina-balancer.jar
(I don't have the source), so I can't change the package import directly.
该课程的最新版本是什么,我应该使用哪个版本(以及如何使用)?
What is the later version of the class and which version should I be using (and how)?
推荐答案
您要查找的类位于 Tomcat 文件夹中.%TOMCAT_HOME%/server/lib/tomcat-util.jar 确保你没有覆盖默认的类路径/加载器,也没有忘记在 Tomcat 目录中添加
The class you are looking for is in the Tomcat folder. %TOMCAT_HOME%/server/lib/tomcat-util.jar Make sure you haven't overridden the default classpath/loader and forgot to add in the Tomcat directories
这篇关于Java:哪个 Apache Digester 类?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!