<cache name="shiro-activeSessionCache"
maxEntriesLocalHeap="2000"
eternal="false"
timeToIdleSeconds="3600"
timeToLiveSeconds="0"
overflowToDisk="false"
statistics="true">
</cache>
錯誤的原因是ehcache.xml文件配置錯誤:
Element <defaultCache> does not allow attribute "maxElementsOnDisk".
意思是 <defaultCache> 下不允許設置maxElementOnDisk屬性。刪除即可。