java.lang.ClassNotFoundException:org.springframework.web.context.ContextLoaderListener问题

Joh*_*ith 5 java spring web.xml spring-mvc spring-security

当我尝试启动我的应用程序时,控制台显示下一个堆栈跟踪:

java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
Run Code Online (Sandbox Code Playgroud)

我已经阅读了同样的问题,但是没有spring-web jar,但是在我的pom.xml中我已经包含了spring依赖项,问题仍然存在:

         <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <version>${spring.version}</version>
        </dependency>
Run Code Online (Sandbox Code Playgroud)

这是web.xml文件(只是为了确定):

<context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>
            classpath:/context/webContext.xml
        </param-value>
    </context-param>

    <context-param>
        <param-name>log4jConfigLocation</param-name>
        <param-value>classpath:log4j.xml</param-value>
    </context-param>



    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>

    <servlet>
        <servlet-name>springServlet</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <init-param>
            <param-name>contextConfigLocation</param-name>
            <param-value></param-value>
        </init-param>
    </servlet>
    <servlet-mapping>
        <servlet-name>springServlet</servlet-name>
        <url-pattern>/</url-pattern>
    </servlet-mapping>


    <filter>
        <filter-name>springSecurityFilterChain</filter-name>
        <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
    </filter>
     <filter-mapping>
            <filter-name>springSecurityFilterChain</filter-name>
            <url-pattern>/*</url-pattern>
        </filter-mapping>

    <session-config>
        <session-timeout>30</session-timeout>
    </session-config>

    <welcome-file-list>
        <welcome-file>login.jsp</welcome-file>
    </welcome-file-list>
Run Code Online (Sandbox Code Playgroud)

我干净..,干净的tomcat工作目录......,我用项目清理工作区 - >干净..但没有任何帮助..我在这样的绝望...

更新=============经过一些操作和魔术:)我成功没有这样的异常,但下一个出现:

java.lang.ClassCastException: org.springframework.web.filter.DelegatingFilterProxy cannot be cast to javax.servlet.Filter
Run Code Online (Sandbox Code Playgroud)