アプリを起動しようとすると、コンソールに次のスタック トレースが表示されます。
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
同じ問題について読んだことがありますが、Spring-Web jar がありませんでしたが、pom.xml に春の依存関係を含めましたが、問題は残ります。
<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>
ここに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>
私はきれいにしました..、きれいなTomcat作業ディレクトリ...、プロジェクト->クリーン..でワークスペースをきれいにしましたが、何も役に立ちませんでした..私はそのような絶望の中にいます...
更新============= いくつかの操作と魔法の後:)私はそのような例外を持たないことに成功しましたが、次が表示されます:
java.lang.ClassCastException: org.springframework.web.filter.DelegatingFilterProxy cannot be cast to javax.servlet.Filter