首页 > 代码库 > springside4启动报错
springside4启动报错
严重: 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 msPS:当时Eclipse编写代码太卡了,关闭了自动编译选项:
springside4启动报错
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。