场景:在练习shiro 的时候,导入了commons-beanutils-1.9.3.jar 和 commons-logging-1.2.jar ,启动tomcat 报错:java.lang.NoClassDefFoundError: org/apache/commons/collections/FastHashMap 和
this web application instance has been stopped already. Could not load .... 错误
原因: org.apache.commons.beanutils.PropertyUtilsBean.getMappedProperty这个方法, 需要使用 一个名叫 org.apache.commons.collections.FastHashMap 的类,这个类是 commons-collections jar里面的.
commons-beanutils
的依赖关系,如下图:
解决方法:往工程加入commons-collections-3.2.jar包