日期:2014-05-18  浏览次数:20653 次

spring集成shiro ehcache时报的错
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shiroFilter' defined in file [D:\apache-tomcat-6.0.20\webapps\PORTAL\WEB-INF\classes\system\applicationContext-shiro.xml]: Cannot resolve reference to bean 'securityManager' while setting bean property 'securityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityManager' defined in file [D:\apache-tomcat-6.0.20\webapps\PORTAL\WEB-INF\classes\system\applicationContext-shiro.xml]: Cannot resolve reference to bean 'shiroDbRealm' while setting bean property 'realm'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shiroDbRealm' defined in file [D:\apache-tomcat-6.0.20\webapps\PORTAL\WEB-INF\classes\system\applicationContext-shiro.xml]: Cannot resolve reference to bean 'checkLoginService' while setting bean property 'checkLoginService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'checkLoginService' defined in file [D:\apache-tomcat-6.0.20\webapps\PORTAL\WEB-INF\classes\system\applicationContext-service.xml]: Cannot resolve reference to bean 'checkLoginDAO' while setting bean property 'checkLoginDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'checkLoginDAO' defined in file [D:\apache-tomcat-6.0.20\webapps\PORTAL\WEB-INF\classes\applicationContext-dao-system.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file [D:\apache-tomcat-6.0.20\webapps\PORTAL\WEB-INF\classes\applicationContext-dao.xml]: Invocation of init method failed; nested exception is net.sf.ehcache.CacheException: Error configuring from file:/D:/apache-tomcat-6.0.20/webapps/PORTAL/WEB-INF/classes/ehcache.xml. Initial cause was Error configuring from input stream. Initial cause was null:4: Element <ehcache> does not allow attribute "xmlns:xsi".
------解决方案--------------------
jar包冲突导致的