Java: Which Apache Digester Class?

北战南征 提交于 2020-01-17 03:14:30

问题


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.

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

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)?

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)?


回答1:


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



来源:https://stackoverflow.com/questions/6294392/java-which-apache-digester-class

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!