严重: 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 file [E:\MbMS\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\mbms\WEB-INF\classes\spring\applicationContext-shiro.xml]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.config.internalTransactionAdvisor': Cannot resolve reference to bean 'org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0' while setting bean property 'transactionAttributeSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0': BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor#0' defined in file [E:\MbMS\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\mbms\WEB-INF\classes\spring\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 [E:\MbMS\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\mbms\WEB-INF\classes\spring\applicationContext-shiro.xml]: Cannot resolve reference to bean 'authRealm' while setting bean property 'realm'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authRealm' defined in file [E:\MbMS\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\mbms\WEB-INF\classes\spring\applicationContext-shiro.xml]: Cannot resolve reference to bean 'credentialsMatcher' while setting bean property 'credentialsMatcher'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'credentialsMatcher' defined in file [E:\MbMS\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\mbms\WEB-INF\classes\spring\applicationContext-shiro.xml]: Cannot resolve reference to bean 'shiroEhcacheManager' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shiroEhcacheManager' defined in file [E:\MbMS\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\mbms\WEB-INF\classes\spring\applicationContext-shiro.xml]: Initialization of bean failed; nested exception is org.springframework.beans.FatalBeanException: Error initializing bean [shiroEhcacheManager]; nested exception is org.apache.shiro.cache.CacheException: net.sf.ehcache.CacheException: Could not create cache directory "D:\ehcache".
Related cause: org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'shiroFilter': Requested bean is currently in creation: Is there an unresolvable circular reference?
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:478)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.context.support.PostProcessorRegistrationDelegate.registerBeanPostProcessors(PostProcessorRegistrationDelegate.java:240)
at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:687)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:523)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:446)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:328)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5068)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5584)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1572)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1562)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
很多bean创建不了是为什么,新项目一脸懵逼求助。
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shiroFilter' defined in file [E:\MbMS\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\mbms\WEB-INF\classes\spring\applicationContext-shiro.xml]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.config.internalTransactionAdvisor': Cannot resolve reference to bean 'org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0' while setting bean property 'transactionAttributeSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0': BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor#0' defined in file [E:\MbMS\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\mbms\WEB-INF\classes\spring\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 [E:\MbMS\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\mbms\WEB-INF\classes\spring\applicationContext-shiro.xml]: Cannot resolve reference to bean 'authRealm' while setting bean property 'realm'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authRealm' defined in file [E:\MbMS\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\mbms\WEB-INF\classes\spring\applicationContext-shiro.xml]: Cannot resolve reference to bean 'credentialsMatcher' while setting bean property 'credentialsMatcher'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'credentialsMatcher' defined in file [E:\MbMS\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\mbms\WEB-INF\classes\spring\applicationContext-shiro.xml]: Cannot resolve reference to bean 'shiroEhcacheManager' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shiroEhcacheManager' defined in file [E:\MbMS\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\mbms\WEB-INF\classes\spring\applicationContext-shiro.xml]: Initialization of bean failed; nested exception is org.springframework.beans.FatalBeanException: Error initializing bean [shiroEhcacheManager]; nested exception is org.apache.shiro.cache.CacheException: net.sf.ehcache.CacheException: Could not create cache directory "D:\ehcache".
Related cause: org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'shiroFilter': Requested bean is currently in creation: Is there an unresolvable circular reference?
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:478)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.context.support.PostProcessorRegistrationDelegate.registerBeanPostProcessors(PostProcessorRegistrationDelegate.java:240)
at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:687)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:523)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:446)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:328)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5068)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5584)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1572)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1562)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
很多bean创建不了是为什么,新项目一脸懵逼求助。
解决方案 »
- Jtable 拖放问题?...急......在线等候
- 如何去掉JDialog最小化,最大化?
- java.util.Properties.load(InputStream inStream)对于文件输入流——这个文件内容格式有何要求
- 想学JAVA各位高手指点下应该看什么书?
- 急!急!!急!!!请教一个输入输出错误
- 正则表达式,求救大神啊,各位大神,求帮忙!!!!!!在线等
- 请教,这句话什么意思 new Class[] {String.class}?
- 用jdk能运行的程序,在jbuilder6中打开后,点右键在菜单中选择run后,却出现错误,这是怎么回事??????
- 请教 structurebuilder 4.5 是干什么用的
- 谁知道怎么用htmlconverter,我下载了一个htmlconv12,但是不知道怎么用?
- 今天java找工作中遇到的面试题目
- 调用其他类成员的方法
除了发送上下文初始化类org.springframework.web.context.ContextLoaderListener的事件监听器实例org.springframework.beans.factory.
org.springframework.beans.factory。BeanCreationException: Error creating bean with name 'shiroFilter' defined in file [E:\MbMS\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\mbms\WEB-INF\classes\spring\applicationContext-shiro.
BeanCreationException:创建bean与错误的名字“shiroFilter”文件中定义[E:\喜忧参半\ . metadata \ . plugins \ org.eclipse.wst.server.core \ tmp1 \ wtpwebapps \喜忧参半\ web - inf \ \ spring \ applicationContext-shiro类。xml]: BeanPostProcessor before instantiation of bean failed;
xml:在bean的实例化之前失败;nested exception is org.springframework.beans.factory.
嵌套的异常org.springframework.beans.factory。BeanCreationException: Error creating bean with name 'org.springframework.transaction.config.internalTransactionAdvisor': Cannot resolve reference to bean 'org.springframework.transaction.annotation.
BeanCreationException:创建bean与错误的名字“org.springframework.transaction.config.internalTransactionAdvisor”:不能解决引用bean org.springframework.transaction.annotation。AnnotationTransactionAttributeSource#0' while setting bean property 'transactionAttributeSource';
AnnotationTransactionAttributeSource # 0”而设置bean属性“transactionAttributeSource”;nested exception is org.springframework.beans.factory.
嵌套的异常org.springframework.beans.factory。BeanCreationException: Error creating bean with name 'org.springframework.transaction.annotation.
BeanCreationException:创建bean名称的org.springframework.transaction.annotation错误。AnnotationTransactionAttributeSource#0': BeanPostProcessor before instantiation of bean failed;
AnnotationTransactionAttributeSource # 0 ':BeanPostProcessor实例化bean之前失败了;nested exception is org.springframework.beans.factory.
嵌套的异常org.springframework.beans.factory。BeanCreationException: Error creating bean with name 'org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor#0' defined in file [E:\MbMS\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\mbms\WEB-INF\classes\spring\applicationContext-shiro.
BeanCreationException:创建bean与错误的名字“org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor # 0”文件中定义[E:\喜忧参半\ . metadata \ . plugins \ org.eclipse.wst.server.core \ tmp1 \ wtpwebapps \喜忧参半\ web - inf \ \ spring \ applicationContext-shiro类。xml]: Cannot resolve reference to bean 'securityManager' while setting bean property 'securityManager';
xml:在设置bean属性“securityManager”时不能解析bean的securityManager;nested exception is org.springframework.beans.factory.
嵌套的异常org.springframework.beans.factory。BeanCreationException: Error creating bean with name 'securityManager' defined in file [E:\MbMS\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\mbms\WEB-INF\classes\spring\applicationContext-shiro.
BeanCreationException:创建bean与错误的名字“securityManager”文件中定义[E:\喜忧参半\ . metadata \ . plugins \ org.eclipse.wst.server.core \ tmp1 \ wtpwebapps \喜忧参半\ web - inf \ \ spring \ applicationContext-shiro类。xml]: Cannot resolve reference to bean 'authRealm' while setting bean property 'realm';
在设置bean属性“域”的同时,不能解析bean“authRealm”;nested exception is org.springframework.beans.factory.
嵌套的异常org.springframework.beans.factory。BeanCreationException: Error creating bean with name 'authRealm' defined in file [E:\MbMS\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\mbms\WEB-INF\classes\spring\applicationContext-shiro.
BeanCreationException:创建bean与错误的名字“authRealm”文件中定义[E:\喜忧参半\ . metadata \ . plugins \ org.eclipse.wst.server.core \ tmp1 \ wtpwebapps \喜忧参半\ web - inf \ \ spring \ applicationContext-shiro类。xml]: Cannot resolve reference to bean 'credentialsMatcher' while setting bean property 'credentialsMatcher';
xml:在设置bean属性的“凭证匹配器”时,不能解析bean的“凭证”;nested exception is org.springframework.beans.factory.
嵌套的异常org.springframework.beans.factory。BeanCreationException: Error creating bean with name 'credentialsMatcher' defined in file [E:\MbMS\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\mbms\WEB-INF\classes\spring\applicationContext-shiro.
BeanCreationException:创建bean与错误的名字“credentialsMatcher”文件中定义[E:\喜忧参半\ . metadata \ . plugins \ org.eclipse.wst.server.core \ tmp1 \ wtpwebapps \喜忧参半\ web - inf \ \ spring \ applicationContext-shiro类。xml]: Cannot resolve reference to bean 'shiroEhcacheManager' while setting constructor argument;
在设置构造器参数时,不能解析bean的shiroEhcacheManager;nested exception is org.springframework.beans.factory.
嵌套的异常org.springframework.beans.factory。BeanCreationException: Error creating bean with name 'shiroEhcacheManager' defined in file [E:\MbMS\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\mbms\WEB-INF\classes\spring\applicationContext-shiro.
BeanCreationException:创建bean与错误的名字“shiroEhcacheManager”文件中定义[E:\喜忧参半\ . metadata \ . plugins \ org.eclipse.wst.server.core \ tmp1 \ wtpwebapps \喜忧参半\ web - inf \ \ spring \ applicationContext-shiro类。xml]: Initialization of bean failed;
xml:bean的初始化失败;nested exception is org.springframework.beans.
嵌套的异常org.springframework.beans。FatalBeanException: Error initializing bean [shiroEhcacheManager];
FatalBeanException:错误初始化bean shiroEhcacheManager;nested exception is org.apache.shiro.cache.
嵌套的异常org.apache.shiro.cache。CacheException: net.sf.ehcache.
CacheException:net.sf.ehcache。CacheException: Could not create cache directory "D:\ehcache".
CacheException:不能创建缓存目录“D:ehcache”。Related cause: org.springframework.beans.factory.
相关原因:org.springframework.beans.factory。BeanCurrentlyInCreationException: Error creating bean with name 'shiroFilter': Requested bean is currently in creation: Is there an unresolvable circular reference?
BeanCurrentlyInCreationException:创建bean与错误的名字“shiroFilter”:创建bean目前提出的要求:有不肯舍弃一个循环引用吗?
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:478)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:478)at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
在1.美元org.springframework.beans.factory.support.AbstractBeanFactory getobject(AbstractBeanFactory.java:306)at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)at org.springframework.context.support.PostProcessorRegistrationDelegate.registerBeanPostProcessors(PostProcessorRegistrationDelegate.java:240)
org.springframework.context.support.PostProcessorRegistrationDelegate.registerBeanPostProcessors(PostProcessorRegistrationDelegate.java:240)at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:687)
org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:687)at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:523)
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:523)at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:446)
org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:446)at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:328)
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:328)at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5068)
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5068)at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5584)
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5584)at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1572)
org.apache.catalina.core.ContainerBase StartChild.call美元(ContainerBase.java:1572)at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1562)
org.apache.catalina.core.ContainerBase StartChild.call美元(ContainerBase.java:1562)at java.util.concurrent.FutureTask.run(FutureTask.java:266)
java.util.concurrent.FutureTask.run(FutureTask.java:266)at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
java.util.concurrent.ThreadPoolExecutor Worker.run美元(ThreadPoolExecutor.java:624)at java.lang.Thread.run(Thread.java:748)
java.lang.Thread.run(Thread.java:748)可以用有道词典查询一下,就知道方向了,循环出错了 看你的bean文件格式对不对 shiroFilter 是不是循环引用了