部署工程就出现错误Closing Spring root WebApplicationContext,大神来急救啊
重新部署web项目的时候出现以下错,求大伙帮我解决下,实在是无策了我,谢谢大伙了先
看:
三月 19, 2013 3:08:18 下午 org.apache.catalina.startup.HostConfig checkResources
INFO: Reloading context [/MySSH01]
三月 19, 2013 3:08:18 下午 org.apache.catalina.core.StandardContext reload
INFO: Reloading Context with name [/MySSH01] has started
三月 19, 2013 3:08:18 下午 org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
三月 19, 2013 3:08:18 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/MySSH01] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
三月 19, 2013 3:08:18 下午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/MySSH01] created a ThreadLocal with key of type [com.sun.faces.util.Util$1] (value [com.sun.faces.util.Util$1@12c10c5]) and a value of type [java.util.HashMap] (value [{com.sun.faces.patternCache={ = }}]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
三月 19, 2013 3:08:18 下午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaksSEVERE: The web application [/MySSH01] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@1254c]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@137de21]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
三月 19, 2013 3:08:21 下午 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/core_rt is already defined
三月 19, 2013 3:08:21 下午 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/core is already defined
三月 19, 2013 3:08:21 下午 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/core is already defined
三月 19, 2013 3:08:21 下午 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/fmt_rt is already defined
三月 19, 2013 3:08:21 下午 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/fmt is already defined
三月 19, 2013 3:08:21 下午 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/fmt is already defined
三月 19, 2013 3:08:21 下午 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/functions is already defined
三月 19, 2013 3:08:21 下午 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/permittedTaglibs is already defined
三月 19, 2013 3:08:21 下午 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/scriptfree is already defined
三月 19, 2013 3:08:21 下午 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/sql_rt is already defined
三月 19, 2013 3:08:21 下午 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/sql is already defined
三月 19, 2013 3:08:21 下午 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/sql is already defined
三月 19, 2013 3:08:21 下午 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/xml_rt is already defined
三月 19, 2013 3:08:21 下午 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/xml is already defined
三月 19, 2013 3:08:21 下午 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/xml is already defined
三月 19, 2013 3:08:21 下午 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://www.springframework.org/tags/form is already defined
三月 19, 2013 3:08:21 下午 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://www.springframework.org/tags is already defined
三月 19, 2013 3:08:21 下午 org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly.
三月 19, 2013 3:08:23 下午 com.sun.faces.config.ConfigureListener contextInitialized
INFO: 初始化上下文 '/MySSH01' 的 Mojarra 2.0.3 (FCS b03)
三月 19, 2013 3:08:23 下午 com.sun.faces.spi.InjectionProviderFactory createInstance
INFO: JSF1048:有 PostConstruct/PreDestroy 注释。标有这些注释的 ManagedBeans 方法将表示注释已处理。
三月 19, 2013 3:08:24 下午 org.apache.catalina.core.StandardContext reload
INFO: Reloading Context with name [/MySSH01] is completed
我的web.xml文件的信息:<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0"
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">
<display-name></display-name>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>
<listener>
<listener-class> org.springframework.web.context.ContextLoaderListener </listener-class>
</listener>
<filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>
spring的配置信息:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<context:annotation-config />
<context:component-scan base-package="cn.huanglei_jmr"/>
<bean id="buyerServiceBean" class="cn.huanglei_jmr.service.imp.BuyerServiceBean"></bean>
<!-- ************************************************************** -->
<bean id="dataSource"
class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName"
value="com.mysql.jdbc.Driver">
</property>
<property name="url"
value="jdbc:mysql://localhost:3306/jmr01?useUnicode=true&characterEncoding=UTF-8">
</property>
<property name="username" value="root"></property>
<property name="password" value="hljmr"></property>
</bean>
<!-- 类工厂由spring管理 -->
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="dataSource"/> <!-- 注入数据源bean到实体管理工厂bean -->
<property name="persistenceXmlLocation" value="classpath:META-INF/persistence.xml"/>
<!-- <property name="loadTimeWeaver">运行时植入
<bean class="org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver"/>
</property> -->
<property name="persistenceUnitName" value="huanglei_jmr"/>
</bean>
<bean id="txManager" class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory"/>
</bean>
<!--注册关于@Transactional的解析器 -->
<tx:annotation-driven transaction-manager="txManager"/>
</beans>
大伙帮我瞧瞧啦
[解决办法]
一般部署都没success的时候,你还是先把部署搞定再启动tomcat吧……