gpt4 book ai didi

exception - 查找 java.lang.NoClassDefFoundError : org/apache/catalina/valves/ValveBase 的问题

转载 作者:行者123 更新时间:2023-11-28 23:01:46 24 4
gpt4 key购买 nike

我正在尝试使用 OpenID 授权码,但是当涉及到

WebAuthentication.login() 

抛出异常

java.lang.NoClassDefFoundError: org/apache/catalina/valves/ValveBase
at org.jboss.web.tomcat.security.login.WebAuthentication.login(WebAuthentication.java:78)
at dotastack.LoginServlet.doGet(LoginServlet.java:61)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)

我已将 catalina.jar 添加到 WEB-INF\lib、类路径、服务器类路径,但这些方法都没有解决异常。帮帮我,我做错了什么?谢谢。

最佳答案

您的错误是将 catalina.jar 添加到 WEB-INF/lib。您不应设置 CLASSPATH 环境变量。

如果你写一个 Valve,Valve 本身需要在 Tomcat 的 lib/ 目录中。您不能将 Valve 与您的 Web 应用程序一起部署。

关于exception - 查找 java.lang.NoClassDefFoundError : org/apache/catalina/valves/ValveBase 的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17869755/

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