参考文章:http://zhidao.baidu.com/link?url=ubYbPI8FJp3mNrxDCLApx5IBRqJnkmMsrw6xBNeCrzr0qq95p4UgGVAs2mCYAD-V5a0gJUHUObRxU_9UlZyslK

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

严重: Servlet.service() for servlet RegisterServlet threw exception
java.lang.ClassNotFoundException: org.apache.commons.collections.FastHashMap
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at org.apache.commons.beanutils.PropertyUtilsBean.getPropertyDescriptor(PropertyUtilsBean.java:959)
at org.apache.commons.beanutils.PropertyUtilsBean.isWriteable(PropertyUtilsBean.java:1466)
at org.apache.commons.beanutils.BeanUtilsBean.copyProperties(BeanUtilsBean.java:277)
at org.apache.commons.beanutils.BeanUtils.copyProperties(BeanUtils.java:135)
at servlet.RegisterServlet.doPost(RegisterServlet.java:64)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at filter.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:31)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
--------------------------------------------------------------------------------------------------------
root cause 


java.lang.NoClassDefFoundError: org/apache/commons/collections/FastHashMap
org.apache.commons.beanutils.PropertyUtilsBean.getPropertyDescriptor(PropertyUtilsBean.java:959)
org.apache.commons.beanutils.PropertyUtilsBean.isWriteable(PropertyUtilsBean.java:1466)
org.apache.commons.beanutils.BeanUtilsBean.copyProperties(BeanUtilsBean.java:277)
org.apache.commons.beanutils.BeanUtils.copyProperties(BeanUtils.java:135)
servlet.RegisterServlet.doPost(RegisterServlet.java:64)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
filter.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:31)




root cause 


java.lang.ClassNotFoundException: org.apache.commons.collections.FastHashMap
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
org.apache.commons.beanutils.PropertyUtilsBean.getPropertyDescriptor(PropertyUtilsBean.java:959)
org.apache.commons.beanutils.PropertyUtilsBean.isWriteable(PropertyUtilsBean.java:1466)
org.apache.commons.beanutils.BeanUtilsBean.copyProperties(BeanUtilsBean.java:277)
org.apache.commons.beanutils.BeanUtils.copyProperties(BeanUtils.java:135)
servlet.RegisterServlet.doPost(RegisterServlet.java:64)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
filter.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:31)


--------------------------------------------------------------------------------------------------------

解决方法:往工程加入commons-collections-3.2.jar包,如下图所示:


--------------------------------------------------------------------------------------------------------------

commons-collections-3.2.jar包下载地址:

http://download.csdn.net/detail/friendan/6963159

-------------------------------------------------------------------------------------------------------------------

您的十分满意是我追求的宗旨。

您的一点建议是我后续的动力。












本文转载:CSDN博客