SSH配置错误集

时间:2022-12-31 21:48:55

配置问题经常跟版本存在很大关系,可能是由于软件的漏洞Bug以及兼容性引起的。配置环境是MyEclipse 7.0、Tomcat 6.0.16、DB2 V9.5。

 

1、在springweb项目中常常会在tomcat启动的时候出现这种提示

log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly.

 

提示应该是读入web应用程序的log4j.properties文件之前就报出来了。是在加载org.springframework.web.context.ContextLoader这个listener的时候没找到log4j的配置文件造成的。 仔细查看web.xml发现在加载org.springframework.web.context.ContextLoader这个listener之后才加载org.springframework.web.util.Log4jConfigListener,把log4j的配置放到org.springframework.web.context.ContextLoader之前,就可以解决这个问题了。

2、关闭服务器时出现如下错误:

2010-6-29 13:34:29 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc

严重: A web application registered the JBDC driver [com.ibm.db2.jcc.DB2Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.

2010-6-29 13:34:29 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads

严重: A web application appears to have started a thread named [Thread-1] but has failed to stop it. This is very likely to create a memory leak.

2010-6-29 13:34:29 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-6-29 13:34:29 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap

严重: A web application created a ThreadLocal with key of type [null] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@121f956]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@178b0f9]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.

2010-6-29 13:34:29 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap

严重: A web application created a ThreadLocal with key of type [null] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@aab87f]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@36bc0a]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.

 

使用Tomcat服务器6.0.0以下版本

3、当启动tomcat时,最上面的信息显示会有

2008-1-31 9:49:33 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: The Apache Portable Runtime which allows optimal performance in production environments was not found on the java.library.path: D:/program/Java/jdk1.5.0_04/bin;D:/program/ASF/Tomcat/bin

而且在关闭tomcat时会显示

2008-1-31 9:50:33 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: Failed shutdown of Apache Portable Runtime

下载一个dll放到前面提示信息的目录下(jre目录下的bin)
http://tomcat.heanet.ie/native/1.1.9/binaries/win32/tcnative-1.dll

为啥可以看这里

http://tomcat.apache.org/tomcat-5.5-doc/apr.html

4、关闭Tomcat时,出现Socket accept failed

这个问题自己也还没有解决。有人说是IP V6引起的。还没有确认。