【问题解决】 web项目启动不了 org.springframework.beans.factory.BeanCreationException: Could not autowire field:
2017-12-07 17:59
1351 查看
错误:
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: com.cb.udbservice.serviceice.UdbServiceIcePrx com.cb.register.cache.SysdataCache.udbServiceIcePrx; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘udbServiceIcePrx’ defined in ServletContext resource [/WEB-INF/conf/ice.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public com.cb.udbservice.serviceice.UdbServiceIcePrx com.cb.udbservice.serviceiceimpl.UdbIceServiceFactory.createUdbService()] threw exception; nested exception is Ice.NoEndpointException
proxy = “Udb/UdbService -t”
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessorAutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:506)atorg.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)atorg.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:284)…59moreCausedby:org.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname‘udbServiceIcePrx′definedinServletContextresource[/WEB−INF/conf/ice.xml]:Instantiationofbeanfailed;nestedexceptionisorg.springframework.beans.factory.BeanDefinitionStoreException:Factorymethod[publiccom.cb.udbservice.serviceice.UdbServiceIcePrxcom.cb.udbservice.serviceiceimpl.UdbIceServiceFactory.createUdbService()]threwexception;nestedexceptionisIce.NoEndpointExceptionproxy=“Udb/UdbService−t”atorg.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:581)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1015)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:911)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)atorg.springframework.beans.factory.support.AbstractBeanFactory1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:848)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:790)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:707)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:478)
… 61 more
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public com.cb.udbservice.serviceice.UdbServiceIcePrx com.cb.udbservice.serviceiceimpl.UdbIceServiceFactory.createUdbService()] threw exception; nested exception is Ice.NoEndpointException
proxy = “Udb/UdbService -t”
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:169)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:570)
解决方法:
修改ice host 配置
确定服务器地址是否正确且能正常运行,如下图
修改项目配置 和udb服务配置
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: com.cb.udbservice.serviceice.UdbServiceIcePrx com.cb.register.cache.SysdataCache.udbServiceIcePrx; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘udbServiceIcePrx’ defined in ServletContext resource [/WEB-INF/conf/ice.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public com.cb.udbservice.serviceice.UdbServiceIcePrx com.cb.udbservice.serviceiceimpl.UdbIceServiceFactory.createUdbService()] threw exception; nested exception is Ice.NoEndpointException
proxy = “Udb/UdbService -t”
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessorAutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:506)atorg.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)atorg.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:284)…59moreCausedby:org.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname‘udbServiceIcePrx′definedinServletContextresource[/WEB−INF/conf/ice.xml]:Instantiationofbeanfailed;nestedexceptionisorg.springframework.beans.factory.BeanDefinitionStoreException:Factorymethod[publiccom.cb.udbservice.serviceice.UdbServiceIcePrxcom.cb.udbservice.serviceiceimpl.UdbIceServiceFactory.createUdbService()]threwexception;nestedexceptionisIce.NoEndpointExceptionproxy=“Udb/UdbService−t”atorg.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:581)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1015)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:911)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)atorg.springframework.beans.factory.support.AbstractBeanFactory1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:848)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:790)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:707)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:478)
… 61 more
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public com.cb.udbservice.serviceice.UdbServiceIcePrx com.cb.udbservice.serviceiceimpl.UdbIceServiceFactory.createUdbService()] threw exception; nested exception is Ice.NoEndpointException
proxy = “Udb/UdbService -t”
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:169)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:570)
解决方法:
修改ice host 配置
确定服务器地址是否正确且能正常运行,如下图
修改项目配置 和udb服务配置
相关文章推荐
- 关于SpringMVC中org.springframework.beans.factory.BeanCreationException: Could not autowire field:的问题的解决
- Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field
- Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field
- org.springframework.beans.factory.BeanCreationException: Could not autowire field:
- 个人笔记 org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.
- Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: privat
- springBoot:Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire fi
- 搭建SSH框架解决的小问题org.springframework.beans.factory.BeanCreationException
- spring异常解决方法:org.springframework.beans.factory.BeanCreationNotAllowedException
- org.springframework.beans.factory.BeanCreationException 解决办法
- 出现 org.springframework.beans.factory.BeanCreationException 异常的原因及解决方法
- org.springframework.beans.factory.BeanCreationException: Scope 'request' is not active for the current thread
- 解决org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.spring
- org.springframework.beans.factory.BeanCreationException:报错解决
- org.springframework.beans.factory.BeanCreationException---这个错误怎么解决,求助!!!
- 报错解决Context initialization failed org.springframework.beans.factory.BeanCreationException
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDao'问题
- org.springframework.beans.factory.BeanCreationException(spring注入问题)
- Spring 框架:org.springframework.beans.factory.BeanCreationException/NotWritablePropertyException
- tomcat启动报错:org.springframework.beans.factory.BeanCreationException