spring-shiro 配置 报错 求大神帮忙看一下

qq_37200172 2017-07-26 02:27:32
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shiroFilter' defined in file [E:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp3\wtpwebapps\mblog-web\WEB-INF\classes\conf\spring-shiro.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityManager' defined in file [E:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp3\wtpwebapps\mblog-web\WEB-INF\classes\conf\spring-shiro.xml]: Cannot create inner bean 'mblog.shiro.realm.AccountRealm#4bdc0d4a' of type [mblog.shiro.realm.AccountRealm] while setting bean property 'realm'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mblog.shiro.realm.AccountRealm#4bdc0d4a': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private mblog.core.persist.service.UserService mblog.shiro.realm.AccountRealm.userService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private mblog.core.persist.dao.UserDao mblog.core.persist.service.impl.UserServiceImpl.userDao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDaoImpl' defined in URL [jar:file:/E:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp3/wtpwebapps/mblog-web/WEB-INF/lib/mblog-core-0.0.1-SNAPSHOT.jar!/mblog/core/persist/dao/impl/UserDaoImpl.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in URL [jar:file:/E:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp3/wtpwebapps/mblog-web/WEB-INF/lib/mblog-core-0.0.1-SNAPSHOT.jar!/conf/spring-dao.xml]: Invocation of init method failed; nested exception is org.hibernate.search.exception.SearchException: HSEARCH000103: Unable to initialize IndexManager named 'posts'
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:547)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.context.support.PostProcessorRegistrationDelegate.registerBeanPostProcessors(PostProcessorRegistrationDelegate.java:232)
at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:615)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:465)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:434)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4842)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5303)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1407)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1397)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityManager' defined in file [E:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp3\wtpwebapps\mblog-web\WEB-INF\classes\conf\spring-shiro.xml]: Cannot create inner bean 'mblog.shiro.realm.AccountRealm#4bdc0d4a' of type [mblog.shiro.realm.AccountRealm] while setting bean property 'realm'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mblog.shiro.realm.AccountRealm#4bdc0d4a': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private mblog.core.persist.service.UserService mblog.shiro.realm.AccountRealm.userService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private mblog.core.persist.dao.UserDao mblog.core.persist.service.impl.UserServiceImpl.userDao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDaoImpl' defined in URL [jar:file:/E:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp3/wtpwebapps/mblog-web/WEB-INF/lib/mblog-core-0.0.1-SNAPSHOT.jar!/mblog/core/persist/dao/impl/UserDaoImpl.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in URL [jar:file:/E:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp3/wtpwebapps/mblog-web/WEB-INF/lib/mblog-core-0.0.1-SNAPSHOT.jar!/conf/spring-dao.xml]: Invocation of init method failed; nested exception is org.hibernate.search.exception.SearchException: HSEARCH000103: Unable to initialize IndexManager named 'posts'
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:313)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:122)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1477)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1222)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByName(AbstractAutowireCapableBeanFactory.java:1240)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1190)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)
... 20 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mblog.shiro.realm.AccountRealm#4bdc0d4a': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private mblog.core.persist.service.UserService mblog.shiro.realm.AccountRealm.userService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private mblog.core.persist.dao.UserDao mblog.core.persist.service.impl.UserServiceImpl.userDao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDaoImpl' defined in URL [jar:file:/E:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp3/wtpwebapps/mblog-web/WEB-INF/lib/mblog-core-0.0.1-SNAPSHOT.jar!/mblog/core/persist/dao/impl/UserDaoImpl.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in URL [jar:file:/E:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp3/wtpwebapps/mblog-web/WEB-INF/lib/mblog-core-0.0.1-SNAPSHOT.jar!/conf/spring-dao.xml]: Invocation of init method failed; nested exception is org.hibernate.search.exception.SearchException: HSEARCH000103: Unable to initialize IndexManager named 'posts'




...全文
151 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
李德胜1995 2017-07-26
  • 打赏
  • 举报
回复
web.xml和配置shiro的文件贴出来看看。。
等待时候 2017-07-26
  • 打赏
  • 举报
回复
spring-shiro.xml 中的 ShiroFilter 是否和web.xml中的ShiroFilter 名字相同呢? web.xml:

<filter>
    <filter-name>ShiroFilter</filter-name>
  </filter>
spring-shiro.xml:

 <bean id="ShiroFilter" class="org.apache.shiro.spring.web.ShiroFilterFactoryBean">

50,535

社区成员

发帖
与我相关
我的任务
社区描述
Java相关技术讨论
javaspring bootspring cloud 技术论坛(原bbs)
社区管理员
  • Java相关社区
  • 小虚竹
  • 谙忆
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧