码迷,mamicode.com
首页 > 编程语言 > 详细

springside4启动报错

时间:2014-12-30 15:19:59      阅读:169      评论:0      收藏:0      [点我收藏+]

标签:

技术分享

严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener 
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘shiroFilter‘ defined in URL [file:/D:/eclipse/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/flowers/WEB-INF/classes/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 URL [file:/D:/eclipse/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/flowers/WEB-INF/classes/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‘: Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException


很奇葩有木有,首先想到的是XML配置错了?定位到D:/eclipse/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/flowers/WEB-INF/classes/applicationContext-shiro.xml,发现配置文件存在,那么是配置信息中securityManager的配置有错误,或者securityManager、shiroDbRealm相关的类有问题……但是配置貌似也没错误。至少这个ShiroDbRealm是SpringSide例子自带的,demo上运行是没问题,不应该有错误的,那么为啥类不能被加载??这种情况不是类没编写就是类没编译成class文件啊!尝试以下操作,编译项目:

技术分享

再次运行,启动成功!

十二月 30, 2014 1:56:45 下午 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring FrameworkServlet 'springServlet'
十二月 30, 2014 1:56:46 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-nio-80"]
十二月 30, 2014 1:56:46 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-nio-8080"]
十二月 30, 2014 1:56:46 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-nio-8009"]
十二月 30, 2014 1:56:46 下午 org.apache.catalina.startup.Catalina start
信息: Server startup in 13171 ms
PS:当时Eclipse编写代码太卡了,关闭了自动编译选项:

技术分享

springside4启动报错

标签:

原文地址:http://blog.csdn.net/up1up2up3/article/details/42265431

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!