SSH调试时Redeploy(重新部署)Tomcat错误解决
2010-3-20 9:56:51 org.apache.catalina.startup.HostConfig checkResources
信息: Reloading context [/sshblog]
2010-3-20 9:56:52 org.apache.catalina.core.ApplicationContext log
信息: Closing Spring root WebApplicationContext
2010-3-20 9:56:52 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: A web application registered the JBDC 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.
2010-3-20 9:56:52 org.apache.catalina.loader.WebappClassLoader clearReferencesStopTimerThread
严重: A web application appears to have started a TimerThread named [Timer-0] via the java.util.Timer API but has failed to stop it. To prevent a memory leak, the timer (and hence the associated thread) has been forcibly cancelled.
2010-3-20 9:56:52 org.apache.catalina.loader.WebappClassLoader clearReferencesStopTimerThread
严重: A web application appears to have started a TimerThread named [MySQL Statement Cancellation Timer] via the java.util.Timer API but has failed to stop it. To prevent a memory leak, the timer (and hence the associated thread) has been forcibly cancelled.
2010-3-20 9:56:52 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: A web application appears to have started a thread named [Store com.angelsixth.blog.model.Category Spool Thread] but has failed to stop it. This is very likely to create a memory leak.
2010-3-20 9:56:52 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: A web application appears to have started a thread named [Store com.angelsixth.blog.model.Blog Spool Thread] but has failed to stop it. This is very likely to create a memory leak.
2010-3-20 9:56:52 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: A web application appears to have started a thread named [Store com.angelsixth.blog.model.User Spool Thread] but has failed to stop it. This is very likely to create a memory leak.
2010-3-20 9:56:52 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: A web application appears to have started a thread named [Store com.angelsixth.blog.model.Link Spool Thread] but has failed to stop it. This is very likely to create a memory leak.
2010-3-20 9:56:52 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
严重: A web application created a ThreadLocal with key of type [null] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@48ddac]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@1d1747c]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.
2010-3-20 9:56:52 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
严重: A web application created a ThreadLocal with key of type [null] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@48ddac]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@15ccc72]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.
2010-3-20 9:56:52 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
严重: A web application created a ThreadLocal with key of type [null] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@48ddac]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@1725217]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.
解决方法:
1.下载apache-tomcat-6.0.20 这个版本(因为在网上看到说是更新Tomcat现任的一位程序员反对[Thread],所以新版的Tomca都会出现这问题(至少6.0.24和6.0.26都会出现这问题).而6.0以前的好像支持不大好,所以就选择了6.0.20)
附上Tomcat所有版本的下载地址: http://archive.apache.org/dist/tomcat/tomcat-6/
2.接着还会报个错误
Struts2出现异常Caught exception while loading file struts-default.xml - [unknown location]
Caught exception while loading file struts-default.xml - [unknown location]
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:839)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:131)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:100)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:130)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452)
at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:205)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3800)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4450)
at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1173)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1271)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:296)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassCastException: org.apache.xerces.parsers.XML11Configuration cannot be cast to org.apache.xerces.xni.parser.XMLParserConfiguration
at org.apache.xerces.parsers.DOMParser.<init>(Unknown Source)
at org.apache.xerces.parsers.DOMParser.<init>(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.<init>(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(Unknown Source)
at com.sun.org.apache.xalan.internal.xsltc.trax.SAX2DOM.createDocument(SAX2DOM.java:326)
at com.sun.org.apache.xalan.internal.xsltc.trax.SAX2DOM.<init>(SAX2DOM.java:85)
at com.sun.org.apache.xalan.internal.xsltc.runtime.output.TransletOutputHandlerFactory.getSerializationHandler(TransletOutputHandlerFactory.java:187)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getOutputHandler(TransformerImpl.java:392)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerHandlerImpl.setResult(TransformerHandlerImpl.java:137)
at com.opensymphony.xwork2.util.DomHelper$DOMBuilder.setup(DomHelper.java:213)
at com.opensymphony.xwork2.util.DomHelper$DOMBuilder.<init>(DomHelper.java:198)
at com.opensymphony.xwork2.util.DomHelper$DOMBuilder.<init>(DomHelper.java:189)
at com.opensymphony.xwork2.util.DomHelper$DOMBuilder.<init>(DomHelper.java:175)
at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:115)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:830)
... 21 more
解决办法:将Hibernate Core Libraries下的xerces-2.6.2.jar文件删除(版本不一定相同)或者在lib目录中删除,然后把服务器部署过的此项目也删掉,重新部署一下,应该没问题了。
删除的方法我也顺便说下吧
在添加Hibernate开发支持时的窗口(如图)
点击 View and edit libraries
去除你要去除的包...OK完成