org.springframework.beans.factory.BeanCreationException: Error creating bean with name

这个问题在别人电脑上面没有出现,但我的电脑就出现了,在网上找各种解决方法:有的说是asm.jar冲突,有的说要配置byName,有的说是路径问题但路径明显是正确的。

严重: 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 ‘org.springframework.security.filterChains‘: Cannot resolve reference to bean ‘org.springframework.security.web.DefaultSecurityFilterChain#23‘ while setting bean property
‘sourceList‘ with key [23]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘org.springframework.security.web.DefaultSecurityFilterChain#23‘: Cannot create inner bean ‘(inner bean)‘ of type [org.springframework.security.web.authentication.logout.LogoutFilter]
while setting constructor argument with key [1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘(inner bean)#25‘: Cannot resolve reference to bean ‘org.springframework.security.web.authentication.rememberme.PersistentTokenBasedRememberMeServices#0‘
while setting constructor argument with key [1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘org.springframework.security.web.authentication.rememberme.PersistentTokenBasedRememberMeServices#0‘:
Cannot create inner bean ‘(inner bean)‘ while setting bean property ‘userDetailsService‘; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘(inner bean)#27‘: Instantiation of bean failed; nested exception
is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [org.springframework.security.core.userdetails.UserDetailsService org.springframework.security.config.http.UserDetailsServiceFactoryBean.cachingUserDetailsService(java.lang.String)]
threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘userService‘ defined in file [D:\Java\apache-tomcat-7.0.61\webapps\code\WEB-INF\classes\idnong\config\spring\spring-system.xml]: Cannot
resolve reference to bean ‘baseDAO‘ while setting bean property ‘baseDAO‘; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘baseDAO‘ defined in class path resource [idnong/config/spring/applicationContext.xml]:
Cannot resolve reference to bean ‘sqlMapClient‘ while setting bean property ‘sqlMapClient‘; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sqlMapClient‘ defined in class path resource [idnong/config/spring/applicationContext.xml]:
Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [idnong/config/sql/SqlMapConfig.xml]; nested exception is com.ibatis.common.xml.NodeletException: Error parsing
XML.  Cause: java.lang.RuntimeException: Error parsing XPath ‘/sqlMapConfig/sqlMap‘.  Cause: java.io.IOException: Could not find resource com/pimp/enterprise/employee/entity/Application.xml

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:353)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:153)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1325)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1086)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:563)

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)

at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)

at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)

at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)

at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5016)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5528)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)

at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1258)

at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1918)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)

at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)

at java.util.concurrent.FutureTask.run(FutureTask.java:138)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

at java.lang.Thread.run(Thread.java:619)

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘org.springframework.security.web.DefaultSecurityFilterChain#23‘: Cannot create inner bean ‘(inner bean)‘ of type [org.springframework.security.web.authentication.logout.LogoutFilter]
while setting constructor argument with key [1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘(inner bean)#25‘: Cannot resolve reference to bean ‘org.springframework.security.web.authentication.rememberme.PersistentTokenBasedRememberMeServices#0‘
while setting constructor argument with key [1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘org.springframework.security.web.authentication.rememberme.PersistentTokenBasedRememberMeServices#0‘:
Cannot create inner bean ‘(inner bean)‘ while setting bean property ‘userDetailsService‘; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘(inner bean)#27‘: Instantiation of bean failed; nested exception
is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [org.springframework.security.core.userdetails.UserDetailsService org.springframework.security.config.http.UserDetailsServiceFactoryBean.cachingUserDetailsService(java.lang.String)]
threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘userService‘ defined in file [D:\Java\apache-tomcat-7.0.61\webapps\code\WEB-INF\classes\idnong\config\spring\spring-system.xml]: Cannot
resolve reference to bean ‘baseDAO‘ while setting bean propert

y ‘baseDAO‘; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘baseDAO‘ defined in class path resource [idnong/config/spring/applicationContext.xml]: Cannot resolve reference to bean ‘sqlMapClient‘ while
setting bean property ‘sqlMapClient‘; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sqlMapClient‘ defined in class path resource [idnong/config/spring/applicationContext.xml]: Invocation of init
method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [idnong/config/sql/SqlMapConfig.xml]; nested exception is com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:
java.lang.RuntimeException: Error parsing XPath ‘/sqlMapConfig/sqlMap‘.  Cause: java.io.IOException: Could not find resource com/pimp/enterprise/employee/entity/Application.xml

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:281)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:125)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:353)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:153)

at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:616)

at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:148)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1003)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:907)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)

... 31 more

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘(inner bean)#25‘: Cannot resolve reference to bean ‘org.springframework.security.web.authentication.rememberme.PersistentTokenBasedRememberMeServices#0‘ while
setting constructor argument with key [1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘org.springframework.security.web.authentication.rememberme.PersistentTokenBasedRememberMeServices#0‘: Cannot
create inner bean ‘(inner bean)‘ while setting bean property ‘userDetailsService‘; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘(inner bean)#27‘: Instantiation of bean failed; nested exception
is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [org.springframework.security.core.userdetails.UserDetailsService org.springframework.security.config.http.UserDetailsServiceFactoryBean.cachingUserDetailsService(java.lang.String)]
threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘userService‘ defined in file [D:\Java\apache-tomcat-7.0.61\webapps\code\WEB-INF\classes\idnong\config\spring\spring-system.xml]: Cannot
resolve reference to bean ‘baseDAO‘ while setting bean property ‘baseDAO‘; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘baseDAO‘ defined in class path resource [idnong/config/spring/applicationContext.xml]:
Cannot resolve reference to bean ‘sqlMapClient‘ while setting bean property ‘sqlMapClient‘; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sqlMapClient‘ defined in class path resource [idnong/config/spring/applicationContext.xml]:
Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [idnong/config/sql/SqlMapConfig.xml]; nested exception is com.ibatis.common.xml.NodeletException: Error parsing
XML.  Cause: java.lang.RuntimeException: Error parsing XPath ‘/sqlMapConfig/sqlMap‘.  Cause: java.io.IOException: Could not find resource com/pimp/enterprise/employee/entity/Application.xml

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:353)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:153)

at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:616)

at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:148)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1003)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:907)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:270)

... 45 more

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘org.springframework.security.web.authentication.rememberme.PersistentTokenBasedRememberMeServices#0‘: Cannot create inner bean ‘(inner bean)‘ while setting bean
property ‘userDetailsService‘; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘(inner bean)#27‘: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException:
Factory method [org.springframework.security.core.userdetails.UserDetailsService org.springframework.security.config.http.UserDetailsServiceFactoryBean.cachingUserDetailsService(java.lang.String)] threw exception; nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name ‘userService‘ defined in file [D:\Java\apache-tomcat-7.0.61\webapps\code\WEB-INF\classes\idnong\config\spring\spring-system.xml]: Cannot resolve reference to bean ‘baseDAO‘ while setting bean property ‘baseDAO‘; nested exception
is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘baseDAO‘ defined in class path resource [idnong/config/spring/applicationContext.xml]: Cannot resolve reference to bean ‘sqlMapClient‘ while setting bean property ‘sqlMapClient‘;
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sqlMapClient‘ defined in cl

ass path resource [idnong/config/spring/applicationContext.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [idnong/config/sql/SqlMapConfig.xml]; nested
exception is com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: java.lang.RuntimeException: Error parsing XPath ‘/sqlMapConfig/sqlMap‘.  Cause: java.io.IOException: Could not find resource com/pimp/enterprise/employee/entity/Application.xml

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:281)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:125)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1325)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1086)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)

... 55 more

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘(inner bean)#27‘: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [org.springframework.security.core.userdetails.UserDetailsService
org.springframework.security.config.http.UserDetailsServiceFactoryBean.cachingUserDetailsService(java.lang.String)] threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘userService‘ defined
in file [D:\Java\apache-tomcat-7.0.61\webapps\code\WEB-INF\classes\idnong\config\spring\spring-system.xml]: Cannot resolve reference to bean ‘baseDAO‘ while setting bean property ‘baseDAO‘; nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name ‘baseDAO‘ defined in class path resource [idnong/config/spring/applicationContext.xml]: Cannot resolve reference to bean ‘sqlMapClient‘ while setting bean property ‘sqlMapClient‘; nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name ‘sqlMapClient‘ defined in class path resource [idnong/config/spring/applicationContext.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class
path resource [idnong/config/sql/SqlMapConfig.xml]; nested exception is com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: java.lang.RuntimeException: Error parsing XPath ‘/sqlMapConfig/sqlMap‘.  Cause: java.io.IOException: Could not find resource
com/pimp/enterprise/employee/entity/Application.xml

at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:581)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:983)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:879)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:270)

... 65 more

Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [org.springframework.security.core.userdetails.UserDetailsService org.springframework.security.config.http.UserDetailsServiceFactoryBean.cachingUserDetailsService(java.lang.String)]
threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘userService‘ defined in file [D:\Java\apache-tomcat-7.0.61\webapps\code\WEB-INF\classes\idong\config\spring\spring-system.xml]: Cannot
resolve reference to bean ‘baseDAO‘ while setting bean property ‘baseDAO‘; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘baseDAO‘ defined in class path resource [idong/config/spring/applicationContext.xml]:
Cannot resolve reference to bean ‘sqlMapClient‘ while setting bean property ‘sqlMapClient‘; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sqlMapClient‘ defined in class path resource [idong/config/spring/applicationContext.xml]:
Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [idong/config/sql/SqlMapConfig.xml]; nested exception is com.ibatis.common.xml.NodeletException: Error parsing
XML.  Cause: java.lang.RuntimeException: Error parsing XPath ‘/sqlMapConfig/sqlMap‘.  Cause: java.io.IOException: Could not find resource com/pimp/enterprise/employee/entity/Application.xml

at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:157)

at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:570)

... 70 more

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘userService‘ defined in file [D:\Java\apache-tomcat-7.0.61\webapps\code\WEB-INF\classes\idong\config\spring\spring-system.xml]: Cannot resolve reference to bean
‘baseDAO‘ while setting bean property ‘baseDAO‘; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘baseDAO‘ defined in class path resource [idong/config/spring/applicationContext.xml]: Cannot resolve
reference to bean ‘sqlMapClient‘ while setting bean property ‘sqlMapClient‘; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sqlMapClient‘ defined in class path resource [idong/config/spring/applicationContext.xml]:
Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [idong/config/sql/SqlMapConfig.xml]; nested exception is com.ibatis.common.xml.NodeletException: Error parsing
XML.  Cause: java.lang.RuntimeException: Error parsing XPath ‘/sqlMapConfig/sqlMap‘.  Cause: java.io.IOException: Could not find resource com/pimp/enterprise/employee/entity/Application.xml

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1325)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1086)

at org.springframework.beans.factory.support.AbstractAutowireCapab

leBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:398)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:388)

at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1140)

at org.springframework.security.config.http.UserDetailsServiceFactoryBean.getBeansOfType(UserDetailsServiceFactoryBean.java:114)

at org.springframework.security.config.http.UserDetailsServiceFactoryBean.getUserDetailsService(UserDetailsServiceFactoryBean.java:95)

at org.springframework.security.config.http.UserDetailsServiceFactoryBean.cachingUserDetailsService(UserDetailsServiceFactoryBean.java:39)

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.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:145)

... 71 more

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘baseDAO‘ defined in class path resource [idong/config/spring/applicationContext.xml]: Cannot resolve reference to bean ‘sqlMapClient‘ while setting bean property
‘sqlMapClient‘; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sqlMapClient‘ defined in class path resource [idong/config/spring/applicationContext.xml]: Invocation of init method failed; nested
exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [idong/config/sql/SqlMapConfig.xml]; nested exception is com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: java.lang.RuntimeException:
Error parsing XPath ‘/sqlMapConfig/sqlMap‘.  Cause: java.io.IOException: Could not find resource com/pimp/enterprise/employee/entity/Application.xml

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1325)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1086)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)

... 91 more

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sqlMapClient‘ defined in class path resource [idong/config/spring/applicationContext.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException:
Failed to parse config resource: class path resource [idong/config/sql/SqlMapConfig.xml]; nested exception is com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: java.lang.RuntimeException: Error parsing XPath ‘/sqlMapConfig/sqlMap‘.  Cause:
java.io.IOException: Could not find resource com/pimp/enterprise/employee/entity/Application.xml

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)

... 101 more

Caused by: org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [idong/config/sql/SqlMapConfig.xml]; nested exception is com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: java.lang.RuntimeException:
Error parsing XPath ‘/sqlMapConfig/sqlMap‘.  Cause: java.io.IOException: Could not find resource com/pimp/enterprise/employee/entity/Application.xml

at org.springframework.orm.ibatis.SqlMapClientFactoryBean.buildSqlMapClient(SqlMapClientFactoryBean.java:341)

at org.springframework.orm.ibatis.SqlMapClientFactoryBean.afterPropertiesSet(SqlMapClientFactoryBean.java:291)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)

... 108 more

Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: java.lang.RuntimeException: Error parsing XPath ‘/sqlMapConfig/sqlMap‘.  Cause: java.io.IOException: Could not find resource com/pimp/enterprise/employee/entity/Application.xml

at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:62)

at com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:62)

at com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:55)

at org.springframework.orm.ibatis.SqlMapClientFactoryBean.buildSqlMapClient(SqlMapClientFactoryBean.java:338)

... 111 more

Caused by: java.lang.RuntimeException: Error parsing XPath ‘/sqlMapConfig/sqlMap‘.  Cause: java.io.IOException: Could not find resource com/pimp/enterprise/employee/entity/Application.xml

at com.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:123)

at com.ibatis.common.xml.NodeletParser.process(NodeletParser.java:84)

at com.ibatis.common.xml.NodeletParser.process(NodeletParser.java:102)

at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:72)

at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:60)

... 114 more

Caused by: java.io.IOException: Could not find resource com/pimp/enterprise/employee/entity/Application.xml

at com.ibatis.common.resources.Resour

ces.getResourceAsStream(Resources.java:110)

at com.ibatis.common.resources.Resources.getResourceAsStream(Resources.java:95)

at com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser$10.process(SqlMapConfigParser.java:249)

at com.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:121)

... 118 more

2015-5-5 10:39:26 org.apache.catalina.core.StandardContext startInternal

严重: Error listenerStart

2015-5-5 10:39:26 org.apache.catalina.core.StandardContext startInternal

严重: Context [/code] startup failed due to previous errors

2015-5-5 10:39:26 org.apache.catalina.core.ApplicationContext log

信息: Closing Spring root WebApplicationContext

2015-5-5 10:39:26 org.apache.catalina.core.ApplicationContext log

信息: Shutting down log4j

2015-5-5 10:39:26 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc

严重: The web application [/code] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.

2015-5-5 10:39:26 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads

严重: The web application [/code] appears to have started a thread named [MySQL Statement Cancellation Timer] but has failed to stop it. This is very likely to create a memory leak.

2015-5-5 10:39:27 org.apache.catalina.startup.HostConfig deployDirectory

原因:

Application.xml 这个文件部署到tomcat里面时首字母变成小写了 ,应该是和Spring的文件重名。改为大写。。。

时间: 2024-10-13 10:41:15

org.springframework.beans.factory.BeanCreationException: Error creating bean with name的相关文章

【报错】org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'webSocketHandlerMapping' defined in class path resource

环境:maven+eclipse+jdk1.8 [tomcat使用的是maven自带的插件,实质原因就是出在tomcat版本问题] 背景:在进行SSM集成WebSocket的时候,项目启动报org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'webSocketHandlerMapping' defined in class path resource错误,详细如下 org.

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory'

spring整合mybatis的时候,传统dao模式test报错 发现是在pojo类user对应的user.xml中配置路径写错了 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init m

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.mybatis.spring.mapper.MapperScannerConfigurer#0' defined in class path resource

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.mybatis.spring.mapper.MapperScannerConfigurer#0' defined in class path resource [applicationContext.xml]: Initialization of bean failed; nested exc

错误/异常:org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/classes/beans_common.xml]...的解决方法

1.异常/错误视图 错误/异常描述:sessionFactory 初始化失败. 说明:我用的是SSH框架.JDK-1.8:Tomcat-7.0 我用到的jar包: 2.解决方法 我 出现在这个问题的原因是:jar包的问题(应该是冲突),我删除了hibernate-core-4.1.12.Final.jar这个jar包,问题就解决了. 其他原因: 1.保证jar包没有问题的情况下,还出现这个问题,那么就是你的Spring配置文件配置错了,请仔细检查,改回来即可. 2.保证jar包没有问题,Spri

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jpaMappingContext之解决办法

错误产生背景:将之前用Eclipse写的Blog项目迁移到Idea上面.Ecilpse项目一直是没有问题的. 错误原因分析:原因是项目依赖中引入的jpa,另外也与Idea比较智能也有关系 解决办法: 第一,在启动类中加上如下注解代码 @SpringBootApplication(exclude = {DataSourceAutoConfiguration.class,JpaRepositoriesAutoConfiguration.class,HibernateJpaAutoConfigurat

spring测试出错:Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.resource.ResourceHttpRequestHandler#0':

解决办法 这里找不到根路径,也就找不到Spring-config.xml的配置,所以加上更改根路径的注解@WebAppConfiguration(“src/main/resources”)就解决了 1 @RunWith(SpringJUnit4ClassRunner.class) 2 @WebAppConfiguration("src/main/resources") //加上这个注解完美解决 3 @ContextConfiguration(locations = {"cla

【实战问题】【14】org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'xxMapper'

问题: SpringBoot启动时报错: Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException:Error creating bean with name 'userDaoMapper' defined in file [E:\WebProject\... 解决方案: pom.xml文件引入了两个Mybatis依赖包.一个是整合SpringBoot的,一个是整合Spring的jar包.两个一

Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException:

严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'daoSupport': Injection of resou

Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field

1 错误描述 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.sc.oa.test.timer.dao.TimerDaoTest': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationExcep