尽管存在所有类,但仍为ClassNotFoundException

时间:2019-05-30 00:49:50

标签: java amazon-web-services tomcat netbeans

尽管所需的库位于我的应用程序的WEB-INF / lib文件夹中,但tomcat服务器仍抛出ClassNotFoundException。

所有库都添加到了我正在使用的IDE Netbeans的库部分中。

这是完整的消息:

Type Exception Report

Message Servlet execution threw an exception.
Description The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception

javax.servlet.ServletException: Servlet execution threw an exception
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)

Root Cause

java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
    com.amazonaws.regions.AwsRegionProviderChain.<clinit>(AwsRegionProviderChain.java:33)
    com.amazonaws.client.builder.AwsClientBuilder.<clinit>(AwsClientBuilder.java:60)
    UserCreator.createWithCognito(UserCreator.java:193)
    UserCreator.doGet(UserCreator.java:77)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)

Root Cause

java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory
    org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1363)
    org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1186)
    com.amazonaws.regions.AwsRegionProviderChain.<clinit>(AwsRegionProviderChain.java:33)
    com.amazonaws.client.builder.AwsClientBuilder.<clinit>(AwsClientBuilder.java:60)
    UserCreator.createWithCognito(UserCreator.java:193)
    UserCreator.doGet(UserCreator.java:77)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)

Note: The full stack trace of the root cause is available in the server logs.

0 个答案:

没有答案