Spring Framework 3.1.3.RELEASE & MAVEN을 사용하여 간단한 웹 응용 프로그램을 개발하고 있습니다. 다음과 같이Spring ContextLoaderListener를 시작하는 중 오류가 발생했습니다.
INFO: Deploying web application archive sampleapp.war
11/12/2012 3:45:03 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
11/12/2012 3:45:03 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/sampleapp] startup failed due to previous errors
내 web.xml을 보이는 : 내가 web.xml 파일에서 리스너에서 수행하지 않는 내 응용 프로그램
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
Tomcat이 다음과 같은 오류를보고 시작되지 것
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<display-name>EMS</display-name>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/spring/*-context.xml</param-value>
</context-param>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
이 시점에서 응용 프로그램 컨텍스트 파일이 비어 있습니다.
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd">
</beans>
/lib에
eclipselink-2.4.0.jar
javax.persistence-2.0.0.jar
mysql-connector-java-5.1.21.jar
spring-context-3.1.3.RELEASE.jar
spring-core-3.1.3.RELEASE.jar
spring-web-3.1.3.RELEASE.jar
spring-webmvc-3.1.3.RELEASE.jar
다음
아래에있는 파일입니다 WEB-INF아래
는 아래의 JAR 파일입니다 WEB-INF
나는 이해application.properties
spring-context.xml
web.xml
:
- 의 ContextLoaderListener 봄에 볼 수 있습니다 -web-3.1.3.RELEASE.jar
- JAR이 WEB-INF/lib에서 사용 가능한 경우에는를 선택해야합니다 TOMCAT의.
내가 뭘 잘못하고 있니?
당신이 당신의 봄 콩 정의 파일과 완전한 스택 추적을 게시 할 수 있습니까? – ElderMael
감사합니다. Mael, 응용 프로그램 컨텍스트 파일을 포함하도록 질문을 업데이트했습니다.DI를 사용하기 전에 응용 프로그램을 실행하고 실행하려는 경우 비어 있습니다. – Maro