常见错误收集

commons-beanutils-1.8.0.jar不加这个包 
java.lang.NoClassDefFoundError: org/apache/commons/beanutils/DynaBean 
commons-collections.jar 不加这个包 
java.lang.NoClassDefFoundError: org/apache/commons/collections/map/ListOrderedMap 
commons-lang-2.4.jar不加这个包 
java.lang.NoClassDefFoundError: org/apache/commons/lang/exception/NestableRuntimeException 
commons-logging-1.1.1.jar不加这个包 
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory 
ezmorph-1.0.4.jar不加这个包 
java.lang.NoClassDefFoundError: net/sf/ezmorph/Morpher 
json-lib-2.3-jdk15.jar不加这个包 
java.lang.NoClassDefFoundError: net/sf/json/JSONObject 

 

error at ::0 can't find referenced pointcut..可能出现错误的原因

解决办法:

出现这种错误需要检查JDK版本与易用的aspectJrt的版本,如果你的JDK是1.6那么需要下载最新的aspectj-1.6.6.jar  附件已提供

或者改变你的JDK版本

 

 

(转)Tomcat6.0的Thisisverylikelytocreateamemoryleak异常

從Apache Tomcat 5.5升級到6.0,通常不用太大的修改,原有的Web Application就能繼續運作。不過在server.xml中設定MySQL Datasource,卻出現一串惱人的警告訊息: 

2010/8/6 下午 01:54:11 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc 
嚴重的: The 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/8/6 下午 01:54:11 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads 
嚴重的: The web application [/] appears to have started a thread named [Timer-0] but has failed to stop it. This is very likely to create a memory leak. 
2010/8/6 下午 01:54:11 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads 
嚴重的: The web application [/] appears to have started a thread named [MySQL Statement Cancellation Timer] but has failed to stop it. This is very likely to create a memory leak. 

更新MySQL Connector/J至最新版也沒用,似乎是Tomcat 6.0對於Memory Leak的防範變得比較雞婆智慧,才會多了這樣的警告。 

既然被列為嚴重程度的警告,當然就不能視而不見,解決的方法並不難,只是要把原本設定在區段中的搬到,修改方式如下。 

1. 將<Resource name="jdbc/NAME" auth="Container" type="javax.sql.DataSource" ... /> 整塊剪下,再貼到 <GlobalNamingResources> ... </GlobalNamingResources> 之間。 

2. 在原本Resource標籤的位置加入<ResourceLink global="jdbc/NAME" name="jdbc/NAME" type="javax.sql.DataSource" /> 

2011-11-09 10:40 tomcat memory leak 在tomcat(版本6.0.33)的 catalina.out中发现大量memory leak的日志 

org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap 

SEVERE: The web application [] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@2618d45f]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@51dce88]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak. 

这个是由于tomcat6.0.24以后的版本有加一个监控memory leak的listener 在tomcathome/conf/server.xml 

<!-- Prevent memory leaks due to use of particular java/javax APIs--> 

<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" /> 

但是这个监控有bug才导致的误报 

解决方式任选一种 1 把tomcat降级为6.0.24以下的版本 

2 将tomcat升级为7.0.6以上的版本 

3 在server.xml中去掉JreMemoryLeakPreventionListener的listener 

http://wiki.apache.org/tomcat/MemoryLeakProtection  
01-29 253
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值