tomcat 6.0.32
jdk jdk1.6.0_24
SSH
在本地Eclipse MyEclipse 编译通过,一台测试服务器上默认tomcat/webapp/ 路径下war deploy时,也正常运行。
可是,后调整了ROOT.war deploy 的默认的路径,比如放到/var/www/html/ROOT.war ,tomcat默认路径也修改成/var/www/html/ROOT时,会出现标题registered the JDBC driver等的错误。
google后很多修补方式,也有官方的https://issues.apache.org/jira/browse/DBCP-332
后检查启动日志
tail -f /java/apache-tomcat-6.0.32/logs/catalina.out
在启动过程中日志中发现,刚开始启动tomcat没结束,就有另外一个启动把之前的启动进程干预掉了,暂时不知道是干预关闭还是其他的
Jul 30, 2011 1:57:08 PM org.apache.catalina.core.AprLifecycleListener init
###################这里明显已经启动了SSH
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /var/www/html/java/jdk1.6.0_24/jre/lib/amd64/server:/var/www/html/java/jdk1.6.0_24/jre/lib/amd64:/var/www/html/java/jdk1.6.0_24/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
Jul 30, 2011 1:57:08 PM org.apache.coyote.http11.Http11Protocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
Jul 30, 2011 1:57:08 PM org.apache.catalina.startup.Catalina load
信息: Initialization processed in 606 ms
Jul 30, 2011 1:57:08 PM org.apache.catalina.core.StandardService start
信息: Starting service Catalina
Jul 30, 2011 1:57:08 PM org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.32
log4j:WARN Error initializing output writer.
log4j:WARN Unsupported encoding?
[framework 2011-07-30 13:57:09,362 - org.springframework.web.context.ContextLoader -1 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization started
[framework 2011-07-30 13:57:09,404 - org.springframework.web.context.support.XmlWebApplicationContext -43 [main] INFO org.springframework.web.context.support.XmlWebApplicationContext - Refreshing org.springframework.web.context.support.XmlWebApplicationContext@786db724: display name [Root WebApplicationContext]; startup date [Sat Jul 30 13:57:09 CST 2011]; root of context hierarchy
[framework 2011-07-30 13:57:09,470 - org.springframework.beans.factory.xml.XmlBeanDefinitionReader -109 [main] INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from file [/var/www/html/java/webroot/ROOT/WEB-INF/classes/config/spring-sqlInit.xml]
[framework 2011-07-30 13:57:09,716 - org.springframework.beans.factory.xml.XmlBeanDefinitionReader -355 [main] INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from file [/var/www/html/java/webroot/ROOT/WEB-INF/classes/config/spring-dao.xml]
[framework 2011-07-30 13:57:09,992 - org.springframework.beans.factory.xml.XmlBeanDefinitionReader -631 [main] INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from file [/var/www/html/java/webroot/ROOT/WEB-INF/classes/config/spring-service.xml]
[framework 2011-07-30 13:57:10,053 - org.springframework.beans.factory.xml.XmlBeanDefinitionReader -692 [main] INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from file [/var/www/html/java/webroot/ROOT/WEB-INF/classes/config/spring-beans.xml]
[framework 2011-07-30 13:57:10,328 - org.springframework.beans.factory.xml.XmlBeanDefinitionReader -967 [main] INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from file [/var/www/html/java/webroot/ROOT/WEB-INF/classes/config/memcache-applicationContext.xml]
[framework 2011-07-30 13:57:10,358 - org.springframework.web.context.support.XmlWebApplicationContext -997 [main] INFO org.springframework.web.context.support.XmlWebApplicationContext - Bean factory for application context [org.springframework.web.context.support.XmlWebApplicationContext@786db724]: org.springframework.beans.factory.support.DefaultListableBeanFactory@10f268de
[framework 2011-07-30 13:57:10,580 - org.springframework.beans.factory.config.PropertyPlaceholderConfigurer -1219 [main] INFO org.springframework.beans.factory.config.PropertyPlaceholderConfigurer - Loading properties file from class path resource [config/jdbc.properties]
[framework 2011-07-30 13:57:10,581 - org.springframework.beans.factory.config.PropertyPlaceholderConfigurer -1220 [main] INFO org.springframework.beans.factory.config.PropertyPlaceholderConfigurer - Loading properties file from class path resource [config/globlesetting.properties]
[framework 2011-07-30 13:57:10,698 - org.springframework.beans.factory.support.DefaultListableBeanFactory -1337 [main] INFO org.springframework.beans.factory.support.DefaultListableBeanFactory - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@10f268de: defining beans [sqlInit,baseHibernateDAO,acceptAddressDao,babyDao,billContentDao,billInfoDao,billNameDao,billTypeDao,cardsDao,cartDao,cityDao,courseInfoDao,courseTypeDao,mnrOprLogDao,mnrsDao,orderAddDao,orderConfirmDao,orderInfoDao,orderPayDao,orderProdsDao,orderSendDao,orderTypeDao,payStatusDao,paymentDao,prodGiftDao,prodItemTypeDao,prodItemUnitDao,prodItemsDao,prodOrderTypeDao,prodSalesMonthDao,prodSalesPriceDao,prodStageDao,prodStageMonthDao,prodStageMonthInfoDao,prodTypeDao,prodsDao,provinceDao,crmUsersDao,eduDao,splistDao,schoolDao,sendCompanyDao,sendGoodsDao,sendTimeDao,sendTypeDao,shortDealDao,sysLogDao,testInfoDao,testTypeDao,trialDao,log4jDao,usersDao,sManagerDao,sMPRelationDao,baseService,acceptAddressService,babyService,billContentService,billInfoService,billNameService,billTypeService,cardsService,cartService,cityService,courseInfoService,courseTypeService,log4jService,mnrOprLogService,mnrsService,orderAddService,orderConfirmService,orderInfoService,orderPayService,orderProdsService,orderSendService,orderTypeService,paymentService,payStatusService,prodGiftService,prodItemsService,prodItemTypeService,prodItemUnitService,prodOrderTypeService,prodSalesMonthService,prodSalesPriceService,prodsService,prodStageService,prodStageMonthService,prodStageMonthInfoService,prodTypeService,provinceService,schoolService,sendCompanyService,sendGoodsService,sendTimeService,sendTypeService,shortDealService,crmUserService,eduService,splistService,sysLogService,testInfoService,testTypeService,trialService,usersService,sManagerService,sMPRelationService,httpUrl123,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,txManager,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0,propertyConfigurer,dataSource,sessionFactory,txAdvice,memcachedPool,memcachedClient,memcacheClientUtil]; root of factory hierarchy
[framework 2011-07-30 13:57:11,044 - org.hibernate.cfg.Environment -1683 [main] INFO org.hibernate.cfg.Environment - Hibernate 3.2.5
[framework 2011-07-30 13:57:11,048 - org.hibernate.cfg.Environment -1687 [main] INFO org.hibernate.cfg.Environment - hibernate.properties not found
[framework 2011-07-30 13:57:11,051 - org.hibernate.cfg.Environment -1690 [main] INFO org.hibernate.cfg.Environment - Bytecode provider name : cglib
[framework 2011-07-30 13:57:11,054 - org.hibernate.cfg.Environment -1693 [main] INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
[framework 2011-07-30 13:57:11,496 - org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean -2135 [main] INFO org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean - Building new Hibernate SessionFactory
[framework 2011-07-30 13:57:11,558 - org.hibernate.connection.ConnectionProviderFactory -2197 [main] INFO org.hibernate.connection.ConnectionProviderFactory - Initializing connection provider: org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider
[framework 2011-07-30 13:57:12,237 - org.hibernate.cfg.SettingsFactory -2876 [main] INFO org.hibernate.cfg.SettingsFactory - RDBMS: MySQL, version: 5.0.77-log
[framework 2011-07-30 13:57:12,238 - org.hibernate.cfg.SettingsFactory -2877 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-5.0.3 ( $Date: 2006-07-26 17:26:47 +0200 (Wed, 26 Jul 2006) $, $Revision: 5553 $ )
[framework 2011-07-30 13:57:12,253 - org.hibernate.dialect.Dialect -2892 [main] INFO org.hibernate.dialect.Dialect - Using dialect: org.hibernate.dialect.MySQLDialect
[framework 2011-07-30 13:57:12,257 - org.hibernate.transaction.TransactionFactoryFactory -2896 [main] INFO org.hibernate.transaction.TransactionFactoryFactory - Transaction strategy: org.springframework.orm.hibernate3.SpringTransactionFactory
[framework 2011-07-30 13:57:12,259 - org.hibernate.transaction.TransactionManagerLookupFactory -2898 [main] INFO org.hibernate.transaction.TransactionManagerLookupFactory - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
[framework 2011-07-30 13:57:12,259 - org.hibernate.cfg.SettingsFactory -2898 [main] INFO org.hibernate.cfg.SettingsFactory - Automatic flush during beforeCompletion(): disabled
[framework 2011-07-30 13:57:12,260 - org.hibernate.cfg.SettingsFactory -2899 [main] INFO org.hibernate.cfg.SettingsFactory - Automatic session close at end of transaction: disabled
[framework 2011-07-30 13:57:12,261 - org.hibernate.cfg.SettingsFactory -2900 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC batch size: 50
[framework 2011-07-30 13:57:12,261 - org.hibernate.cfg.SettingsFactory -2900 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC batch updates for versioned data: disabled
[framework 2011-07-30 13:57:12,262 - org.hibernate.cfg.SettingsFactory -2901 [main] INFO org.hibernate.cfg.SettingsFactory - Scrollable result sets: enabled
[framework 2011-07-30 13:57:12,263 - org.hibernate.cfg.SettingsFactory -2902 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC3 getGeneratedKeys(): enabled
[framework 2011-07-30 13:57:12,264 - org.hibernate.cfg.SettingsFactory -2903 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC result set fetch size: 100
[framework 2011-07-30 13:57:12,264 - org.hibernate.cfg.SettingsFactory -2903 [main] INFO org.hibernate.cfg.SettingsFactory - Connection release mode: auto
[framework 2011-07-30 13:57:12,266 - org.hibernate.cfg.SettingsFactory -2905 [main] INFO org.hibernate.cfg.SettingsFactory - Maximum outer join fetch depth: 2
[framework 2011-07-30 13:57:12,266 - org.hibernate.cfg.SettingsFactory -2905 [main] INFO org.hibernate.cfg.SettingsFactory - Default batch fetch size: 1
[framework 2011-07-30 13:57:12,267 - org.hibernate.cfg.SettingsFactory -2906 [main] INFO org.hibernate.cfg.SettingsFactory - Generate SQL with comments: disabled
[framework 2011-07-30 13:57:12,267 - org.hibernate.cfg.SettingsFactory -2906 [main] INFO org.hibernate.cfg.SettingsFactory - Order SQL updates by primary key: disabled
[framework 2011-07-30 13:57:12,268 - org.hibernate.cfg.SettingsFactory -2907 [main] INFO org.hibernate.cfg.SettingsFactory - Order SQL inserts for batching: disabled
[framework 2011-07-30 13:57:12,269 - org.hibernate.cfg.SettingsFactory -2908 [main] INFO org.hibernate.cfg.SettingsFactory - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
[framework 2011-07-30 13:57:12,271 - org.hibernate.hql.ast.ASTQueryTranslatorFactory -2910 [main] INFO org.hibernate.hql.ast.ASTQueryTranslatorFactory - Using ASTQueryTranslatorFactory
[framework 2011-07-30 13:57:12,272 - org.hibernate.cfg.SettingsFactory -2911 [main] INFO org.hibernate.cfg.SettingsFactory - Query language substitutions: {}
[framework 2011-07-30 13:57:12,273 - org.hibernate.cfg.SettingsFactory -2912 [main] INFO org.hibernate.cfg.SettingsFactory - JPA-QL strict compliance: disabled
[framework 2011-07-30 13:57:12,273 - org.hibernate.cfg.SettingsFactory -2912 [main] INFO org.hibernate.cfg.SettingsFactory - Second-level cache: enabled
[framework 2011-07-30 13:57:12,274 - org.hibernate.cfg.SettingsFactory -2913 [main] INFO org.hibernate.cfg.SettingsFactory - Query cache: disabled
[framework 2011-07-30 13:57:12,274 - org.hibernate.cfg.SettingsFactory -2913 [main] INFO org.hibernate.cfg.SettingsFactory - Cache provider: org.hibernate.cache.NoCacheProvider
[framework 2011-07-30 13:57:12,275 - org.hibernate.cfg.SettingsFactory -2914 [main] INFO org.hibernate.cfg.SettingsFactory - Optimize cache for minimal puts: disabled
[framework 2011-07-30 13:57:12,276 - org.hibernate.cfg.SettingsFactory -2915 [main] INFO org.hibernate.cfg.SettingsFactory - Structured second-level cache entries: disabled
[framework 2011-07-30 13:57:12,281 - org.hibernate.cfg.SettingsFactory -2920 [main] INFO org.hibernate.cfg.SettingsFactory - Echoing all SQL to stdout
[framework 2011-07-30 13:57:12,281 - org.hibernate.cfg.SettingsFactory -2920 [main] INFO org.hibernate.cfg.SettingsFactory - Statistics: disabled
[framework 2011-07-30 13:57:12,282 - org.hibernate.cfg.SettingsFactory -2921 [main] INFO org.hibernate.cfg.SettingsFactory - Deleted entity synthetic identifier rollback: disabled
[framework 2011-07-30 13:57:12,283 - org.hibernate.cfg.SettingsFactory -2922 [main] INFO org.hibernate.cfg.SettingsFactory - Default entity-mode: pojo
[framework 2011-07-30 13:57:12,284 - org.hibernate.cfg.SettingsFactory -2923 [main] INFO org.hibernate.cfg.SettingsFactory - Named query checking : enabled
[framework 2011-07-30 13:57:12,311 - org.hibernate.impl.SessionFactoryImpl -2950 [main] INFO org.hibernate.impl.SessionFactoryImpl - building session factory
[framework 2011-07-30 13:57:12,894 - org.hibernate.impl.SessionFactoryObjectFactory -3533 [main] INFO org.hibernate.impl.SessionFactoryObjectFactory - Not binding factory to JNDI, no JNDI name configured
[framework 2011-07-30 13:57:13,364 - org.springframework.orm.hibernate3.HibernateTransactionManager -4003 [main] INFO org.springframework.orm.hibernate3.HibernateTransactionManager - Using DataSource [org.apache.commons.dbcp.BasicDataSource@1c6745b9] of Hibernate SessionFactory for HibernateTransactionManager
[framework 2011-07-30 13:57:13,921 - org.springframework.web.context.ContextLoader -4560 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 4556 ms
[framework 2011-07-30 13:57:14,269 - org.apache.struts2.config.BeanSelectionProvider -4908 [main] INFO org.apache.struts2.config.BeanSelectionProvider - Loading global messages from globalMessages
[framework 2011-07-30 13:57:14,344 - org.apache.struts2.spring.StrutsSpringObjectFactory -4983 [main] INFO org.apache.struts2.spring.StrutsSpringObjectFactory - Initializing Struts-Spring integration...
[framework 2011-07-30 13:57:14,345 - org.apache.struts2.spring.StrutsSpringObjectFactory -4984 [main] INFO org.apache.struts2.spring.StrutsSpringObjectFactory - ... initialized Struts-Spring integration successfully
[framework 2011-07-30 13:57:14,924 - org.apache.struts2.config.BeanSelectionProvider -5563 [main] INFO org.apache.struts2.config.BeanSelectionProvider - Loading global messages from globalMessages
[framework 2011-07-30 13:57:14,931 - org.apache.struts2.spring.StrutsSpringObjectFactory -5570 [main] INFO org.apache.struts2.spring.StrutsSpringObjectFactory - Initializing Struts-Spring integration...
[framework 2011-07-30 13:57:14,932 - org.apache.struts2.spring.StrutsSpringObjectFactory -5571 [main] INFO org.apache.struts2.spring.StrutsSpringObjectFactory - ... initialized Struts-Spring integration successfully
Jul 30, 2011 1:57:15 PM org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deploying configuration descriptor manager.xml
Jul 30, 2011 1:57:15 PM org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deploying configuration descriptor host-manager.xml
###################上面SSH已经启动了,现在又开始deployWAR
Jul 30, 2011 1:57:15 PM org.apache.catalina.startup.HostConfig deployWAR信息: Deploying web application archive ROOT.war[framework 2011-07-30 13:57:15,306 - org.springframework.web.context.support.XmlWebApplicationContext -5945 [main] INFO org.springframework.web.context.support.XmlWebApplicationContext - Closing org.springframework.web.context.support.XmlWebApplicationContext@786db724: display name [Root WebApplicationContext]; startup date [Sat Jul 30 13:57:09 CST 2011]; root of context hierarchy [framework 2011-07-30 13:57:15,307 - org.springframework.beans.factory.support.DefaultListableBeanFactory -5946 [main] INFO org.springframework.beans.factory.support.DefaultListableBeanFactory - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@10f268de: defining beans [sqlInit,baseHibernateDAO,acceptAddressDao,babyDao,billContentDao,billInfoDao,billNameDao,billTypeDao,cardsDao,cartDao,cityDao,courseInfoDao,courseTypeDao,mnrOprLogDao,mnrsDao,orderAddDao,orderConfirmDao,orderInfoDao,orderPayDao,orderProdsDao,orderSendDao,orderTypeDao,payStatusDao,paymentDao,prodGiftDao,prodItemTypeDao,prodItemUnitDao,prodItemsDao,prodOrderTypeDao,prodSalesMonthDao,prodSalesPriceDao,prodStageDao,prodStageMonthDao,prodStageMonthInfoDao,prodTypeDao,prodsDao,provinceDao,crmUsersDao,eduDao,splistDao,schoolDao,sendCompanyDao,sendGoodsDao,sendTimeDao,sendTypeDao,shortDealDao,sysLogDao,testInfoDao,testTypeDao,trialDao,log4jDao,usersDao,sManagerDao,sMPRelationDao,baseService,acceptAddressService,babyService,billContentService,billInfoService,billNameService,billTypeService,cardsService,cartService,cityService,courseInfoService,courseTypeService,log4jService,mnrOprLogService,mnrsService,orderAddService,orderConfirmService,orderInfoService,orderPayService,orderProdsService,orderSendService,orderTypeService,paymentService,payStatusService,prodGiftService,prodItemsService,prodItemTypeService,prodItemUnitService,prodOrderTypeService,prodSalesMonthService,prodSalesPriceService,prodsService,prodStageService,prodStageMonthService,prodStageMonthInfoService,prodTypeService,provinceService,schoolService,sendCompanyService,sendGoodsService,sendTimeService,sendTypeService,shortDealService,crmUserService,eduService,splistService,sysLogService,testInfoService,testTypeService,trialService,usersService,sManagerService,sMPRelationService,httpUrl123,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,txManager,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0,propertyConfigurer,dataSource,sessionFactory,txAdvice,memcachedPool,memcachedClient,memcacheClientUtil]; root of factory hierarchy [framework 2011-07-30 13:57:15,328 - org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean -5967 [main] INFO org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean - Closing Hibernate SessionFactory [framework 2011-07-30 13:57:15,329 - org.hibernate.impl.SessionFactoryImpl -5968 [main] INFO org.hibernate.impl.SessionFactoryImpl - closing Jul 30, 2011 1:57:15 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
###################新的进程清理之前启动的进程,两个进程互相打架了
严重: The web application [/] 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.Jul 30, 2011 1:57:15 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads严重: The web application [/] appears to have started a thread named [Timer-3] but has failed to stop it. This is very likely to create a memory leak.Jul 30, 2011 1:57:15 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap严重: The web application [/] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@7e7ee46a]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@3cc62c07]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.Jul 30, 2011 1:57:15 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap严重: The web application [/] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@76749ebc]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@62618565]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.Jul 30, 2011 1:57:15 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap严重: The web application [/] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@707cdc58]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@15664f1a]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.Jul 30, 2011 1:57:15 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap严重: The web application [/] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@6fd33eef]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@15c8f644]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.log4j:ERROR Could not find value for key log4j.appender.A1log4j:ERROR Could not instantiate appender named "A1".[framework 2011-07-30 13:57:17,567 - org.springframework.web.context.ContextLoader -0 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization started [framework 2011-07-30 13:57:17,600 - org.springframework.web.context.support.XmlWebApplicationContext -33 [main] INFO org.springframework.web.context.support.XmlWebApplicationContext - Refreshing org.springframework.web.context.support.XmlWebApplicationContext@1af6a711: display name [Root WebApplicationContext]; startup date [Sat Jul 30 13:57:17 CST 2011]; root of context hierarchy [framework 2011-07-30 13:57:17,659 - org.springframework.beans.factory.xml.XmlBeanDefinitionReader -92 [main] INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from file [/var/www/html/java/apache-tomcat-6.0.32/work/Catalina/localhost/_/WEB-INF/classes/config/spring-sqlInit.xml] [framework 2011-07-30 13:57:17,891 - org.springframework.beans.factory.xml.XmlBeanDefinitionReader -324 [main] INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from file [/var/www/html/java/apache-tomcat-6.0.32/work/Catalina/localhost/_/WEB-INF/classes/config/spring-dao.xml] [framework 2011-07-30 13:57:18,159 - org.springframework.beans.factory.xml.XmlBeanDefinitionReader -592 [main] INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from file [/var/www/html/java/apache-tomcat-6.0.32/work/Catalina/localhost/_/WEB-INF/classes/config/spring-service.xml] [framework 2011-07-30 13:57:18,214 - org.springframework.beans.factory.xml.XmlBeanDefinitionReader -647 [main] INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from file [/var/www/html/java/apache-tomcat-6.0.32/work/Catalina/localhost/_/WEB-INF/classes/config/spring-beans.xml] [framework 2011-07-30 13:57:18,461 - org.springframework.beans.factory.xml.XmlBeanDefinitionReader -894 [main] INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from file [/var/www/html/java/apache-tomcat-6.0.32/work/Catalina/localhost/_/WEB-INF/classes/config/memcache-applicationContext.xml] [framework 2011-07-30 13:57:18,490 - org.springframework.web.context.support.XmlWebApplicationContext -923 [main] INFO org.springframework.web.context.support.XmlWebApplicationContext - Bean factory for application context [org.springframework.web.context.support.XmlWebApplicationContext@1af6a711]: org.springframework.beans.factory.support.DefaultListableBeanFactory@367720d7 [framework 2011-07-30 13:57:18,666 - org.springframework.beans.factory.config.PropertyPlaceholderConfigurer -1099 [main] INFO org.springframework.beans.factory.config.PropertyPlaceholderConfigurer - Loading properties file from class path resource [config/jdbc.properties] [framework 2011-07-30 13:57:18,666 - org.springframework.beans.factory.config.PropertyPlaceholderConfigurer -1099 [main] INFO org.springframework.beans.factory.config.PropertyPlaceholderConfigurer - Loading properties file from class path resource [config/globlesetting.properties] [framework 2011-07-30 13:57:18,754 - org.springframework.beans.factory.support.DefaultListableBeanFactory -1187 [main] INFO org.springframework.beans.factory.support.DefaultListableBeanFactory - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@367720d7: defining beans [sqlInit,baseHibernateDAO,acceptAddressDao,babyDao,billContentDao,billInfoDao,billNameDao,billTypeDao,cardsDao,cartDao,cityDao,courseInfoDao,courseTypeDao,mnrOprLogDao,mnrsDao,orderAddDao,orderConfirmDao,orderInfoDao,orderPayDao,orderProdsDao,orderSendDao,orderTypeDao,payStatusDao,paymentDao,prodGiftDao,prodItemTypeDao,prodItemUnitDao,prodItemsDao,prodOrderTypeDao,prodSalesMonthDao,prodSalesPriceDao,prodStageDao,prodStageMonthDao,prodStageMonthInfoDao,prodTypeDao,prodsDao,provinceDao,crmUsersDao,eduDao,splistDao,schoolDao,sendCompanyDao,sendGoodsDao,sendTimeDao,sendTypeDao,shortDealDao,sysLogDao,testInfoDao,testTypeDao,trialDao,log4jDao,usersDao,sManagerDao,sMPRelationDao,baseService,acceptAddressService,babyService,billContentService,billInfoService,billNameService,billTypeService,cardsService,cartService,cityService,courseInfoService,courseTypeService,log4jService,mnrOprLogService,mnrsService,orderAddService,orderConfirmService,orderInfoService,orderPayService,orderProdsService,orderSendService,orderTypeService,paymentService,payStatusService,prodGiftService,prodItemsService,prodItemTypeService,prodItemUnitService,prodOrderTypeService,prodSalesMonthService,prodSalesPriceService,prodsService,prodStageService,prodStageMonthService,prodStageMonthInfoService,prodTypeService,provinceService,schoolService,sendCompanyService,sendGoodsService,sendTimeService,sendTypeService,shortDealService,crmUserService,eduService,splistService,sysLogService,testInfoService,testTypeService,trialService,usersService,sManagerService,sMPRelationService,httpUrl123,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,txManager,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0,propertyConfigurer,dataSource,sessionFactory,txAdvice,memcachedPool,memcachedClient,memcacheClientUtil]; root of factory hierarchy [framework 2011-07-30 13:57:19,053 - org.hibernate.cfg.Environment -1486 [main] INFO org.hibernate.cfg.Environment - Hibernate 3.2.5 [framework 2011-07-30 13:57:19,056 - org.hibernate.cfg.Environment -1489 [main] INFO org.hibernate.cfg.Environment - hibernate.properties not found [framework 2011-07-30 13:57:19,057 - org.hibernate.cfg.Environment -1490 [main] INFO org.hibernate.cfg.Environment - Bytecode provider name : cglib [framework 2011-07-30 13:57:19,060 - org.hibernate.cfg.Environment -1493 [main] INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling [framework 2011-07-30 13:57:19,419 - org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean -1852 [main] INFO org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean - Building new Hibernate SessionFactory [framework 2011-07-30 13:57:19,475 - org.hibernate.connection.ConnectionProviderFactory -1908 [main] INFO org.hibernate.connection.ConnectionProviderFactory - Initializing connection provider: org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider [framework 2011-07-30 13:57:19,879 - org.hibernate.cfg.SettingsFactory -2312 [main] INFO org.hibernate.cfg.SettingsFactory - RDBMS: MySQL, version: 5.0.77-log [framework 2011-07-30 13:57:19,879 - org.hibernate.cfg.SettingsFactory -2312 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-5.0.3 ( $Date: 2006-07-26 17:26:47 +0200 (Wed, 26 Jul 2006) $, $Revision: 5553 $ ) [framework 2011-07-30 13:57:19,893 - org.hibernate.dialect.Dialect -2326 [main] INFO org.hibernate.dialect.Dialect - Using dialect: org.hibernate.dialect.MySQLDialect [framework 2011-07-30 13:57:19,896 - org.hibernate.transaction.TransactionFactoryFactory -2329 [main] INFO org.hibernate.transaction.TransactionFactoryFactory - Transaction strategy: org.springframework.orm.hibernate3.SpringTransactionFactory [framework 2011-07-30 13:57:19,897 - org.hibernate.transaction.TransactionManagerLookupFactory -2330 [main] INFO org.hibernate.transaction.TransactionManagerLookupFactory - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended) [framework 2011-07-30 13:57:19,897 - org.hibernate.cfg.SettingsFactory -2330 [main] INFO org.hibernate.cfg.SettingsFactory - Automatic flush during beforeCompletion(): disabled [framework 2011-07-30 13:57:19,897 - org.hibernate.cfg.SettingsFactory -2330 [main] INFO org.hibernate.cfg.SettingsFactory - Automatic session close at end of transaction: disabled [framework 2011-07-30 13:57:19,897 - org.hibernate.cfg.SettingsFactory -2330 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC batch size: 50 [framework 2011-07-30 13:57:19,897 - org.hibernate.cfg.SettingsFactory -2330 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC batch updates for versioned data: disabled [framework 2011-07-30 13:57:19,898 - org.hibernate.cfg.SettingsFactory -2331 [main] INFO org.hibernate.cfg.SettingsFactory - Scrollable result sets: enabled [framework 2011-07-30 13:57:19,898 - org.hibernate.cfg.SettingsFactory -2331 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC3 getGeneratedKeys(): enabled [framework 2011-07-30 13:57:19,898 - org.hibernate.cfg.SettingsFactory -2331 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC result set fetch size: 100 [framework 2011-07-30 13:57:19,898 - org.hibernate.cfg.SettingsFactory -2331 [main] INFO org.hibernate.cfg.SettingsFactory - Connection release mode: auto [framework 2011-07-30 13:57:19,899 - org.hibernate.cfg.SettingsFactory -2332 [main] INFO org.hibernate.cfg.SettingsFactory - Maximum outer join fetch depth: 2 [framework 2011-07-30 13:57:19,899 - org.hibernate.cfg.SettingsFactory -2332 [main] INFO org.hibernate.cfg.SettingsFactory - Default batch fetch size: 1 [framework 2011-07-30 13:57:19,899 - org.hibernate.cfg.SettingsFactory -2332 [main] INFO org.hibernate.cfg.SettingsFactory - Generate SQL with comments: disabled [framework 2011-07-30 13:57:19,899 - org.hibernate.cfg.SettingsFactory -2332 [main] INFO org.hibernate.cfg.SettingsFactory - Order SQL updates by primary key: disabled [framework 2011-07-30 13:57:19,899 - org.hibernate.cfg.SettingsFactory -2332 [main] INFO org.hibernate.cfg.SettingsFactory - Order SQL inserts for batching: disabled [framework 2011-07-30 13:57:19,899 - org.hibernate.cfg.SettingsFactory -2332 [main] INFO org.hibernate.cfg.SettingsFactory - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory [framework 2011-07-30 13:57:19,901 - org.hibernate.hql.ast.ASTQueryTranslatorFactory -2334 [main] INFO org.hibernate.hql.ast.ASTQueryTranslatorFactory - Using ASTQueryTranslatorFactory [framework 2011-07-30 13:57:19,901 - org.hibernate.cfg.SettingsFactory -2334 [main] INFO org.hibernate.cfg.SettingsFactory - Query language substitutions: {} [framework 2011-07-30 13:57:19,901 - org.hibernate.cfg.SettingsFactory -2334 [main] INFO org.hibernate.cfg.SettingsFactory - JPA-QL strict compliance: disabled [framework 2011-07-30 13:57:19,901 - org.hibernate.cfg.SettingsFactory -2334 [main] INFO org.hibernate.cfg.SettingsFactory - Second-level cache: enabled [framework 2011-07-30 13:57:19,901 - org.hibernate.cfg.SettingsFactory -2334 [main] INFO org.hibernate.cfg.SettingsFactory - Query cache: disabled [framework 2011-07-30 13:57:19,901 - org.hibernate.cfg.SettingsFactory -2334 [main] INFO org.hibernate.cfg.SettingsFactory - Cache provider: org.hibernate.cache.NoCacheProvider [framework 2011-07-30 13:57:19,901 - org.hibernate.cfg.SettingsFactory -2334 [main] INFO org.hibernate.cfg.SettingsFactory - Optimize cache for minimal puts: disabled [framework 2011-07-30 13:57:19,901 - org.hibernate.cfg.SettingsFactory -2334 [main] INFO org.hibernate.cfg.SettingsFactory - Structured second-level cache entries: disabled [framework 2011-07-30 13:57:19,905 - org.hibernate.cfg.SettingsFactory -2338 [main] INFO org.hibernate.cfg.SettingsFactory - Echoing all SQL to stdout [framework 2011-07-30 13:57:19,905 - org.hibernate.cfg.SettingsFactory -2338 [main] INFO org.hibernate.cfg.SettingsFactory - Statistics: disabled [framework 2011-07-30 13:57:19,905 - org.hibernate.cfg.SettingsFactory -2338 [main] INFO org.hibernate.cfg.SettingsFactory - Deleted entity synthetic identifier rollback: disabled [framework 2011-07-30 13:57:19,906 - org.hibernate.cfg.SettingsFactory -2339 [main] INFO org.hibernate.cfg.SettingsFactory - Default entity-mode: pojo [framework 2011-07-30 13:57:19,906 - org.hibernate.cfg.SettingsFactory -2339 [main] INFO org.hibernate.cfg.SettingsFactory - Named query checking : enabled [framework 2011-07-30 13:57:19,928 - org.hibernate.impl.SessionFactoryImpl -2361 [main] INFO org.hibernate.impl.SessionFactoryImpl - building session factory [framework 2011-07-30 13:57:20,455 - org.hibernate.impl.SessionFactoryObjectFactory -2888 [main] INFO org.hibernate.impl.SessionFactoryObjectFactory - Not binding factory to JNDI, no JNDI name configured [framework 2011-07-30 13:57:20,854 - org.springframework.orm.hibernate3.HibernateTransactionManager -3287 [main] INFO org.springframework.orm.hibernate3.HibernateTransactionManager - Using DataSource [org.apache.commons.dbcp.BasicDataSource@754e912d] of Hibernate SessionFactory for HibernateTransactionManager com.schooner.MemCached.SchoonerSockIOPool Sat Jul 30 13:57:21 CST 2011 - ++++ failed to get SockIO obj for: 127.0.0.1:11211com.schooner.MemCached.SchoonerSockIOPool Sat Jul 30 13:57:21 CST 2011 - ++++ failed to create connection to: 127.0.0.1:11211 -- only 0 created.[framework 2011-07-30 13:57:21,267 - org.springframework.web.context.ContextLoader -3700 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 3699 ms Jul 30, 2011 1:57:21 PM org.apache.catalina.loader.WebappClassLoader findResourceInternal信息: Illegal access: this web application instance has been stopped already. Could not load META-INF/services/org.apache.xerces.xni.parser.XMLParserConfiguration. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.Jul 30, 2011 1:57:21 PM org.apache.catalina.loader.WebappClassLoader findResourceInternal信息: Illegal access: this web application instance has been stopped already. Could not load META-INF/services/org.apache.xerces.xni.parser.XMLParserConfiguration. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.Jul 30, 2011 1:57:21 PM org.apache.catalina.core.StandardContext start严重: Error filterStartJul 30, 2011 1:57:21 PM org.apache.catalina.core.StandardContext start严重: Context [] startup failed due to previous errors[framework 2011-07-30 13:57:21,394 - org.springframework.web.context.support.XmlWebApplicationContext -3827 [main] INFO org.springframework.web.context.support.XmlWebApplicationContext - Closing org.springframework.web.context.support.XmlWebApplicationContext@1af6a711: display name [Root WebApplicationContext]; startup date [Sat Jul 30 13:57:17 CST 2011]; root of context hierarchy [framework 2011-07-30 13:57:21,394 - org.springframework.beans.factory.support.DefaultListableBeanFactory -3827 [main] INFO org.springframework.beans.factory.support.DefaultListableBeanFactory - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@367720d7: defining beans [sqlInit,baseHibernateDAO,acceptAddressDao,babyDao,billContentDao,billInfoDao,billNameDao,billTypeDao,cardsDao,cartDao,cityDao,courseInfoDao,courseTypeDao,mnrOprLogDao,mnrsDao,orderAddDao,orderConfirmDao,orderInfoDao,orderPayDao,orderProdsDao,orderSendDao,orderTypeDao,payStatusDao,paymentDao,prodGiftDao,prodItemTypeDao,prodItemUnitDao,prodItemsDao,prodOrderTypeDao,prodSalesMonthDao,prodSalesPriceDao,prodStageDao,prodStageMonthDao,prodStageMonthInfoDao,prodTypeDao,prodsDao,provinceDao,crmUsersDao,eduDao,splistDao,schoolDao,sendCompanyDao,sendGoodsDao,sendTimeDao,sendTypeDao,shortDealDao,sysLogDao,testInfoDao,testTypeDao,trialDao,log4jDao,usersDao,sManagerDao,sMPRelationDao,baseService,acceptAddressService,babyService,billContentService,billInfoService,billNameService,billTypeService,cardsService,cartService,cityService,courseInfoService,courseTypeService,log4jService,mnrOprLogService,mnrsService,orderAddService,orderConfirmService,orderInfoService,orderPayService,orderProdsService,orderSendService,orderTypeService,paymentService,payStatusService,prodGiftService,prodItemsService,prodItemTypeService,prodItemUnitService,prodOrderTypeService,prodSalesMonthService,prodSalesPriceService,prodsService,prodStageService,prodStageMonthService,prodStageMonthInfoService,prodTypeService,provinceService,schoolService,sendCompanyService,sendGoodsService,sendTimeService,sendTypeService,shortDealService,crmUserService,eduService,splistService,sysLogService,testInfoService,testTypeService,trialService,usersService,sManagerService,sMPRelationService,httpUrl123,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,txManager,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0,propertyConfigurer,dataSource,sessionFactory,txAdvice,memcachedPool,memcachedClient,memcacheClientUtil]; root of factory hierarchy [framework 2011-07-30 13:57:21,404 - org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean -3837 [main] INFO org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean - Closing Hibernate SessionFactory [framework 2011-07-30 13:57:21,404 - org.hibernate.impl.SessionFactoryImpl -3837 [main] INFO org.hibernate.impl.SessionFactoryImpl - closing Jul 30, 2011 1:57:21 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc严重: The web application [] 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.Jul 30, 2011 1:57:21 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads严重: The web application [] appears to have started a thread named [Timer-4] but has failed to stop it. This is very likely to create a memory leak.Jul 30, 2011 1:57:21 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads严重: The web application [] appears to have started a thread named [Timer-5] but has failed to stop it. This is very likely to create a memory leak.Jul 30, 2011 1:57:21 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads严重: The web application [] appears to have started a thread named [Timer-6] but has failed to stop it. This is very likely to create a memory leak.Jul 30, 2011 1:57:21 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads严重: The web application [] appears to have started a thread named [Timer-7] but has failed to stop it. This is very likely to create a memory leak.Jul 30, 2011 1:57:21 PM org.apache.catalina.startup.HostConfig deployDirectory信息: Deploying web application directory examplesJul 30, 2011 1:57:21 PM org.apache.catalina.startup.HostConfig deployDirectory信息: Deploying web application directory docsJul 30, 2011 1:57:21 PM org.apache.coyote.http11.Http11Protocol start信息: Starting Coyote HTTP/1.1 on http-8080Jul 30, 2011 1:57:21 PM org.apache.jk.common.ChannelSocket init信息: JK: ajp13 listening on /0.0.0.0:8009Jul 30, 2011 1:57:21 PM org.apache.jk.server.JkMain start信息: Jk running ID=0 time=0/14 config=nullJul 30, 2011 1:57:21 PM org.apache.catalina.startup.Catalina start信息: Server startup in 13579 ms
对于这样的registered the JDBC driver问题,我初步判定是deploy执行了两次所致。
后分析调整后,Host配置应该如下
path 等于空格 ,不是/或ROOT
还有注意的是,要把之前的文件清理干净了,避免有干扰,重新来一下,启动成功....
下面是用ant来清理这些目录: