1. 程式人生 > >nested exception is java.lang.IllegalAccessError: tried to access method net.sf.ehcache.CacheManager.()V from class org.hibernat

nested exception is java.lang.IllegalAccessError: tried to access method net.sf.ehcache.CacheManager.()V from class org.hibernat

今天配置struts2+hibernate3+spring2時出現這種問題,控制檯輸出了

java.lang.IllegalAccessError: tried to access method net.sf.ehcache.CacheManager.<init>()V from class org.hibernate.cache.EhCacheProvider

上網查了一下.原來是JAR檔案版本問題 

原來專案中使用了ehcache-1.1.jar檔案,

把它換成ehcache-1.2.3.jar檔案後,

重新啟動伺服器,問題解決~~~~