sofastack / sofa-rpc

SOFARPC is a high-performance, high-extensibility, production-level Java RPC framework.
https://www.sofastack.tech/sofa-rpc/docs/Home
Apache License 2.0
3.83k stars 1.18k forks source link

使用指定版本的spring boot,出现异常 #65

Closed xiaowan closed 6 years ago

xiaowan commented 6 years ago

指定spring boot版本为 1.5.12.RELEASE ,sofaboot为2.3.1 ,异常如下: Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled. 2018-04-27 16:55:55.978 ERROR 28116 --- [ main] o.s.boot.SpringApplication : Application startup failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'readinessCheck' defined in class path resource [com/alipay/sofa/healthcheck/service/EndPointConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.alipay.sofa.healthcheck.service.SofaBootReadinessCheckEndpoint]: Factory method 'readinessCheck' threw exception; nested exception is java.lang.IllegalArgumentException: Id must only contains letters, numbers and '_' at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1128) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1022) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:512) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:754) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866) ~[spring-context-4.3.4.RELEASE.jar:4.3.4.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542) ~[spring-context-4.3.4.RELEASE.jar:4.3.4.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.5.12.RELEASE.jar:1.5.12.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) [spring-boot-1.5.12.RELEASE.jar:1.5.12.RELEASE] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) [spring-boot-1.5.12.RELEASE.jar:1.5.12.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) [spring-boot-1.5.12.RELEASE.jar:1.5.12.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) [spring-boot-1.5.12.RELEASE.jar:1.5.12.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) [spring-boot-1.5.12.RELEASE.jar:1.5.12.RELEASE] at com.test.Tet.main(Tet.java:14) [classes/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_91] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_91] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_91] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_91] at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [ideart.jar:na] Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.alipay.sofa.healthcheck.service.SofaBootReadinessCheckEndpoint]: Factory method 'readinessCheck' threw exception; nested exception is java.lang.IllegalArgumentException: Id must only contains letters, numbers and '' at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] ... 23 common frames omitted Caused by: java.lang.IllegalArgumentException: Id must only contains letters, numbers and '_' at org.springframework.util.Assert.isTrue(Assert.java:92) ~[spring-core-4.3.16.RELEASE.jar:4.3.16.RELEASE] at org.springframework.boot.actuate.endpoint.AbstractEndpoint.setId(AbstractEndpoint.java:104) ~[spring-boot-actuator-1.5.12.RELEASE.jar:1.5.12.RELEASE] at org.springframework.boot.actuate.endpoint.AbstractEndpoint.(AbstractEndpoint.java:72) ~[spring-boot-actuator-1.5.12.RELEASE.jar:1.5.12.RELEASE] at com.alipay.sofa.healthcheck.service.SofaBootReadinessCheckEndpoint.(SofaBootReadinessCheckEndpoint.java:44) ~[healthcheck-sofa-boot-starter-2.3.1.jar:2.3.1] at com.alipay.sofa.healthcheck.service.EndPointConfig.readinessCheck(EndPointConfig.java:34) ~[healthcheck-sofa-boot-starter-2.3.1.jar:2.3.1] at com.alipay.sofa.healthcheck.service.EndPointConfig$$EnhancerBySpringCGLIB$$a9497e54.CGLIB$readinessCheck$0() ~[healthcheck-sofa-boot-starter-2.3.1.jar:2.3.1] at com.alipay.sofa.healthcheck.service.EndPointConfig$$EnhancerBySpringCGLIB$$a9497e54$$FastClassBySpringCGLIB$$4bf76371.invoke() ~[healthcheck-sofa-boot-starter-2.3.1.jar:2.3.1] at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) ~[spring-core-4.3.16.RELEASE.jar:4.3.16.RELEASE] at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:356) ~[spring-context-4.3.4.RELEASE.jar:4.3.4.RELEASE] at com.alipay.sofa.healthcheck.service.EndPointConfig$$EnhancerBySpringCGLIB$$a9497e54.readinessCheck() ~[healthcheck-sofa-boot-starter-2.3.1.jar:2.3.1] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_91] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_91] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_91] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_91] at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] ... 24 common frames omitted

2018-04-27 16:55:56.085 INFO 28116 --- [ain-EventThread] org.apache.zookeeper.ClientCnxn : EventThread shut down 2018-04-27 16:55:56.085 INFO 28116 --- [PC-ShutdownHook] org.apache.zookeeper.ZooKeeper : Session: 0x163052a1ee30018 closed

khotyn commented 6 years ago

属于 SOFABoot 的问题,在 alipay/sofa-boot#46 中跟进此问题,这个 ISSUE 先关闭掉了。