錯誤:
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.AutowiredAnnotationBeanPostProcessor
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服務配置