码迷,mamicode.com
首页 > 编程语言 > 详细

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

时间:2015-05-05 12:44:01      阅读:428      评论:0      收藏:0      [点我收藏+]

标签:beancreationexceptio   tomcat   spring   

这个问题在别人电脑上面没有出现,但我的电脑就出现了,在网上找各种解决方法:有的说是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的文件重名。改为大写。。。

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

标签:beancreationexceptio   tomcat   spring   

原文地址:http://blog.csdn.net/zhao50632/article/details/45499413

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!