在JavaEE開發中,在把配置文件中的數據或用戶表單提交上來的數據,封裝在相應JavaBean的對象的對應屬性中時:在實際開發中,使用第三方法工具包BeanUtils(commons-beanutils-xxx.jar 依賴於commons-logging-xx.jar)。 如博主在JavaWeb工 ...
在JavaEE開發中,在把配置文件中的數據或用戶表單提交上來的數據,封裝在相應JavaBean的對象的對應屬性中時:在實際開發中,使用第三方法工具包BeanUtils(commons-beanutils-xxx.jar 依賴於commons-logging-xx.jar)。
如博主在JavaWeb工程中,導入的jar包:commons-beanutils-1.9.3.jar和commons-logging-1.2.jar
這是在運行時報錯了:eption in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/collections/FastHashMap
看來是需要導入commons-collections-xx.jar包
然後博主導入了commens-collections4-4.1.jar沒有解決問題
最後,發現導入commens-collections-3.2.2.jar後解決問題了