Error creating bean with name 'shiroFilter' defined in class path resource [com/

时间:2022-11-12 08:56:32
我在启动时报错。求大虾解救,,报错信息如下

[ERROR] 2014-10-16 11:57:46   [ERROR] - org.springframework.web.context.ContextLoader -ContextLoader.java(319) -Context initialization failed
  org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shiroFilter' defined in class path resource [com/pactera/platform/reqm/resources/spring-security.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 class path resource [com/pactera/platform/reqm/resources/spring-security.xml]: Cannot resolve reference to bean 'myRealm' while setting bean property 'realm'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myRealm': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.pactera.platform.reqm.core.service.IUserManageService com.pactera.platform.reqm.web.security.MyRealm.userService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userManageServiceImpl': Injection of persistence dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [com/pactera/platform/reqm/resources/spring-datasource.xml]: Cannot resolve reference to bean 'hibernateJpaVendorAdapter' while setting bean property 'jpaVendorAdapter'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateJpaVendorAdapter' defined in class path resource [com/pactera/platform/reqm/resources/spring-datasource.xml]: Cannot create inner bean 'com.pactera.platform.reqm.core.util.Hibernates#9fac35' of type [com.pactera.platform.reqm.core.util.Hibernates] while setting bean property 'databasePlatform'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.pactera.platform.reqm.core.util.Hibernates#9fac35' defined in class path resource [com/pactera/platform/reqm/resources/spring-datasource.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public static java.lang.String com.pactera.platform.reqm.core.util.Hibernates.getDialect(javax.sql.DataSource)] threw exception; nested exception is java.lang.RuntimeException: Could not get database url
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:329)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1387)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1128)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198)
at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:753)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4205)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4704)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:675)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:601)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1315)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityManager' defined in class path resource [com/pactera/platform/reqm/resources/spring-security.xml]: Cannot resolve reference to bean 'myRealm' while setting bean property 'realm'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myRealm': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.pactera.platform.reqm.core.service.IUserManageService com.pactera.platform.reqm.web.security.MyRealm.userService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userManageServiceImpl': Injection of persistence dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [com/pactera/platform/reqm/resources/spring-datasource.xml]: Cannot resolve reference to bean 'hibernateJpaVendorAdapter' while setting bean property 'jpaVendorAdapter'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateJpaVendorAdapter' defined in class path resource [com/pactera/platform/reqm/resources/spring-datasource.xml]: Cannot create inner bean 'com.pactera.platform.reqm.core.util.Hibernates#9fac35' of type [com.pactera.platform.reqm.core.util.Hibernates] while setting bean property 'databasePlatform'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.pactera.platform.reqm.core.util.Hibernates#9fac35' defined in class path resource [com/pactera/platform/reqm/resources/spring-datasource.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public static java.lang.String com.pactera.platform.reqm.core.util.Hibernates.getDialect(javax.sql.DataSource)] threw exception; nested exception is java.lang.RuntimeException: Could not get database url
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:329)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1387)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1128)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
... 38 more




14 个解决方案

#1


请问解决没?怎么解决的?

#2


我的问题和你的是一样的,后来找大神帮忙解决了一下,原因是你的包没有倒进去,找到“securityManager”的源码包,导入,clean一下,再重新跑就可以了。希望对你有帮助

#3


问一下解决了吗?

#4


解决了吗?解决了可以告诉我吗?

#5


会不会是jar 包有冲突

#6


你那问题是怎么解决的

#7


问题解决了吗?怎么解决的?

#8


该回复于2016-06-23 13:32:35被管理员删除

#9


问题解决了吗?怎么解决的?

#10


问题解决了吗?怎么解决的?

#11


Error creating bean with name 'shiroFilter' defined in class path resource [com/

#12


我也老是遇到这个问题,有时候clean能解决,有时候不能

#13


我刚刚也遇到相同问题求大神解答

#14


遇到相同的问题了,请问楼主如何解决呢?

#1


请问解决没?怎么解决的?

#2


我的问题和你的是一样的,后来找大神帮忙解决了一下,原因是你的包没有倒进去,找到“securityManager”的源码包,导入,clean一下,再重新跑就可以了。希望对你有帮助

#3


问一下解决了吗?

#4


解决了吗?解决了可以告诉我吗?

#5


会不会是jar 包有冲突

#6


你那问题是怎么解决的

#7


问题解决了吗?怎么解决的?

#8


该回复于2016-06-23 13:32:35被管理员删除

#9


问题解决了吗?怎么解决的?

#10


问题解决了吗?怎么解决的?

#11


Error creating bean with name 'shiroFilter' defined in class path resource [com/

#12


我也老是遇到这个问题,有时候clean能解决,有时候不能

#13


我刚刚也遇到相同问题求大神解答

#14


遇到相同的问题了,请问楼主如何解决呢?