论坛首页 Java企业应用论坛

奇异的 Spring WebApplicationContext 自动关闭

浏览 5948 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2008-03-11  
昨天部署一个 web 应用,出现一个奇异问题. 启动Tomcat 发现 web 应用也正常启动了,不过紧跟着就 close 了,真是郁闷.其Tomcat 日志如下(只列出一部分):

引用
引用
信息: CGLIB2 available: proxyTargetClass feature enabled 2008-3-11 10:51:42 org.springframework.web.context.ContextLoader initWebApplicationContext 信息: Using context class [org.springframework.web.context.support.XmlWebApplicationContext] for root WebApplicationContext 2008-3-11 10:51:42 org.springframework.web.context.ContextLoader initWebApplicationContext 信息: Root WebApplicationContext: initialization completed in 9703 ms 2008-3-11 10:51:45 org.apache.catalina.core.ApplicationContext log 信息: Closing Spring root WebApplicationContext 2008-3-11 10:51:45 org.springframework.context.support.AbstractApplicationContext doClose 信息: Closing application context [Root WebApplicationContext] 2008-3-11 10:51:45 org.springframework.beans.factory.support.AbstractBeanFactory destroySingletons 信息: Destroying singletons in factory {org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [dataSource,sessionFactory,transactionManager,baseTransactionProxy,cmtduggDAO,commentDAO,countryDAO,friendDAO,infomationDAO,infoclassDAO,infoduggDAO,messengerDAO,userinfoDAO,userconfigDAO,userclassconfigDAO,sysconfigDAO,cmtduggService,commentService,countryService,friendService,infomationService,infoclassService,infoduggService,messengerService,userinfoService,userclassconfigService,userconfigService,sysconfigService]; root of BeanFactory hierarchy} 2008-3-11 10:51:45 org.springframework.orm.hibernate3.LocalSessionFactoryBean destroy 信息: Closing Hibernate SessionFactory 2008-3-11 10:51:45 org.hibernate.impl.SessionFactoryImpl close 信息: closing 2008-3-11 10:51:46 org.apache.catalina.core.ApplicationContext log 信息: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]] 2008-3-11 10:51:46 org.apache.catalina.loader.WebappClassLoader loadClass 信息: Illegal access: this web application instance has been stopped already. Could not load java.net.BindException. 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. java.lang.IllegalStateException at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1248) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1208) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at com.mysql.jdbc.CommunicationsException.<init>(CommunicationsException.java:155) at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2652) at com.mysql.jdbc.MysqlIO.quit(MysqlIO.java:1345) at com.mysql.jdbc.Connection.realClose(Connection.java:4731) at com.mysql.jdbc.Connection.cleanup(Connection.java:2034) at com.mysql.jdbc.Connection.finalize(Connection.java:3244) at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method) at java.lang.ref.Finalizer.runFinalizer(Unknown Source) at java.lang.ref.Finalizer.access$100(Unknown Source) at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)


   发表时间:2008-03-11  
信息: Root WebApplicationContext: initialization completed in 9703 ms 


这信息表明 web application 已启动了.

但紧接着出现如下信息:

信息: Closing Spring root WebApplicationContext


看得出,Spring WebApplicationContext 自己关闭.

然后:hibernate 也close
信息: Closing Hibernate SessionFactory 



最后就抛出异常:

信息: Illegal access: this web application instance has been stopped already.  Could not load java.net.BindException.  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.   
java.lang.IllegalStateException   


想了一夜也不明白这种怎么回事.
0 请登录后投票
论坛首页 Java企业应用版

跳转论坛:
Global site tag (gtag.js) - Google Analytics