org.springframework.beans.factory.BeanCreationException Error creating bean with name
2018-02-06 14:17
1366 查看
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'io.servicecomb.config.ConfigurationSpringInitializer#0' defined in URL [jar:file:/C:/Users/jwx539934/.m2/repository/io/servicecomb/foundation-config/0.5.0.B011/foundation-config-0.5.0.B011.jar!/META-INF/spring/cse.bean.xml]:
Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [io.servicecomb.config.ConfigurationSpringInitializer]: Constructor threw exception; nested exception is java.lang.RuntimeException:
Unable to load Properties
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1116)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1060)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:149)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:686)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:524)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
at io.servicecomb.foundation.common.utils.BeanUtils.init(BeanUtils.java:37)
at io.servicecomb.foundation.common.utils.BeanUtils.init(BeanUtils.java:33)
at com.service.hellowordprovider.HellowordproviderApplication.main(HellowordproviderApplication.java:9)
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [io.servicecomb.config.ConfigurationSpringInitializer]: Constructor threw exception; nested exception is java.lang.RuntimeException: Unable to load Properties
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:154)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:89)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1108)
... 15 more
Caused by: java.lang.RuntimeException: Unable to load Properties
at com.netflix.config.AbstractPollingScheduler.initialLoad(AbstractPollingScheduler.java:87)
at com.netflix.config.AbstractPollingScheduler.startPolling(AbstractPollingScheduler.java:200)
at com.netflix.config.DynamicConfiguration.startPolling(DynamicConfiguration.java:60)
at com.netflix.config.DynamicConfiguration.<init>(DynamicConfiguration.java:42)
at io.servicecomb.config.ConfigUtil.createLocalConfig(ConfigUtil.java:109)
at io.servicecomb.config.ConfigUtil.createLocalConfig(ConfigUtil.java:95)
at io.servicecomb.config.ConfigUtil.createDynamicConfig(ConfigUtil.java:173)
at io.servicecomb.config.ConfigUtil.installDynamicConfig(ConfigUtil.java:194)
at io.servicecomb.config.ConfigurationSpringInitializer.<init>(ConfigurationSpringInitializer.java:33)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:142)
... 17 more
Caused by: java.lang.NullPointerException: Value for property cse.service.instance is null
at com.netflix.config.ConcurrentMapConfiguration.addProperty(ConcurrentMapConfiguration.java:178)
at com.netflix.config.DynamicPropertyUpdater.addOrChangeProperty(DynamicPropertyUpdater.java:124)
at com.netflix.config.AbstractPollingScheduler.populateProperties(AbstractPollingScheduler.java:111)
at com.netflix.config.AbstractPollingScheduler.initialLoad(AbstractPollingScheduler.java:85)
... 30 more
我的yaml配置文件格式被我改错了,出现了不应该的空格。
Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [io.servicecomb.config.ConfigurationSpringInitializer]: Constructor threw exception; nested exception is java.lang.RuntimeException:
Unable to load Properties
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1116)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1060)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:149)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:686)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:524)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
at io.servicecomb.foundation.common.utils.BeanUtils.init(BeanUtils.java:37)
at io.servicecomb.foundation.common.utils.BeanUtils.init(BeanUtils.java:33)
at com.service.hellowordprovider.HellowordproviderApplication.main(HellowordproviderApplication.java:9)
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [io.servicecomb.config.ConfigurationSpringInitializer]: Constructor threw exception; nested exception is java.lang.RuntimeException: Unable to load Properties
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:154)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:89)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1108)
... 15 more
Caused by: java.lang.RuntimeException: Unable to load Properties
at com.netflix.config.AbstractPollingScheduler.initialLoad(AbstractPollingScheduler.java:87)
at com.netflix.config.AbstractPollingScheduler.startPolling(AbstractPollingScheduler.java:200)
at com.netflix.config.DynamicConfiguration.startPolling(DynamicConfiguration.java:60)
at com.netflix.config.DynamicConfiguration.<init>(DynamicConfiguration.java:42)
at io.servicecomb.config.ConfigUtil.createLocalConfig(ConfigUtil.java:109)
at io.servicecomb.config.ConfigUtil.createLocalConfig(ConfigUtil.java:95)
at io.servicecomb.config.ConfigUtil.createDynamicConfig(ConfigUtil.java:173)
at io.servicecomb.config.ConfigUtil.installDynamicConfig(ConfigUtil.java:194)
at io.servicecomb.config.ConfigurationSpringInitializer.<init>(ConfigurationSpringInitializer.java:33)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:142)
... 17 more
Caused by: java.lang.NullPointerException: Value for property cse.service.instance is null
at com.netflix.config.ConcurrentMapConfiguration.addProperty(ConcurrentMapConfiguration.java:178)
at com.netflix.config.DynamicPropertyUpdater.addOrChangeProperty(DynamicPropertyUpdater.java:124)
at com.netflix.config.AbstractPollingScheduler.populateProperties(AbstractPollingScheduler.java:111)
at com.netflix.config.AbstractPollingScheduler.initialLoad(AbstractPollingScheduler.java:85)
... 30 more
我的yaml配置文件格式被我改错了,出现了不应该的空格。
相关文章推荐
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name解决方案
- 解决org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'localSessi
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'xxxx'
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name '[beanName]'
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name '***'
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFa
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'g': Injectio
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springfr
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'seniorContro
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource'
- 解决org.springframework.beans.factory.BeanCreationException: Error creating bean with name
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'studentDao'
- nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#1': Can
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'SystControl'
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'studentContr
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'plansAndActi
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bookControll