tangzhexu edited a comment on issue #2123:
URL:
https://github.com/apache/servicecomb-java-chassis/issues/2123#issuecomment-742455031
参考您刚刚贴的示例,现依赖如下:
```
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.servicecomb</groupId>
<artifactId>java-chassis-dependencies</artifactId>
<version>2.1.3</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.servicecomb</groupId>
<artifactId>solution-basic</artifactId>
</dependency>
<dependency>
<groupId>org.apache.servicecomb</groupId>
<artifactId>registry-service-center</artifactId>
</dependency>
<dependency>
<groupId>org.apache.servicecomb</groupId>
<artifactId>java-chassis-spring-boot-starter-standalone</artifactId>
</dependency>
<dependency>
<groupId>org.apache.servicecomb</groupId>
<artifactId>edge-core</artifactId>
</dependency>
</dependencies>
```
启动异常:
```
Exception in thread "main"
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'org.apache.servicecomb.core.ConfigurationSpringInitializer#0'
defined in URL
[jar:file:/C:/Users/tangzhexu/.m2/repository/org/apache/servicecomb/java-chassis-core/2.1.3/java-chassis-core-2.1.3.jar!/META-INF/spring/cse.bean.xml]:
Instantiation of bean failed; nested exception is
org.springframework.beans.BeanInstantiationException: Failed to instantiate
[org.apache.servicecomb.core.ConfigurationSpringInitializer]: Constructor threw
exception; nested exception is java.util.ServiceConfigurationError:
org.apache.servicecomb.foundation.bootstrap.BootStrapService: Provider
org.apache.servicecomb.serviceregistry.auth.RBACBootStrapService could not be
instantiated
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1318)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1213)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:556)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
at
org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207)
at
org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:155)
at
org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:707)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:533)
at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:144)
at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:95)
at
org.apache.servicecomb.foundation.common.utils.BeanUtils.init(BeanUtils.java:62)
at
org.apache.servicecomb.foundation.common.utils.BeanUtils.init(BeanUtils.java:53)
at
com.tellhow.cloud.edge.service.CloudEdgeServiceApplication.main(CloudEdgeServiceApplication.java:11)
Caused by: org.springframework.beans.BeanInstantiationException: Failed to
instantiate [org.apache.servicecomb.core.ConfigurationSpringInitializer]:
Constructor threw exception; nested exception is
java.util.ServiceConfigurationError:
org.apache.servicecomb.foundation.bootstrap.BootStrapService: Provider
org.apache.servicecomb.serviceregistry.auth.RBACBootStrapService could not be
instantiated
at
org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:217)
at
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1310)
... 15 more
Caused by: java.util.ServiceConfigurationError:
org.apache.servicecomb.foundation.bootstrap.BootStrapService: Provider
org.apache.servicecomb.serviceregistry.auth.RBACBootStrapService could not be
instantiated
at java.util.ServiceLoader.fail(ServiceLoader.java:232)
at java.util.ServiceLoader.access$100(ServiceLoader.java:185)
at
java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:384)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
at java.lang.Iterable.forEach(Iterable.java:74)
at
org.apache.servicecomb.foundation.common.utils.SPIServiceUtils.loadSortedService(SPIServiceUtils.java:63)
at
org.apache.servicecomb.foundation.common.utils.SPIServiceUtils.getOrLoadSortedService(SPIServiceUtils.java:95)
at
org.apache.servicecomb.foundation.common.utils.SPIServiceUtils.getSortedService(SPIServiceUtils.java:122)
at
org.apache.servicecomb.core.ConfigurationSpringInitializer.<init>(ConfigurationSpringInitializer.java:72)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at
org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:204)
... 17 more
Caused by: java.lang.NoClassDefFoundError:
org/apache/servicecomb/foundation/auth/Cipher
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
at java.lang.Class.getConstructor0(Class.java:3075)
at java.lang.Class.newInstance(Class.java:412)
at
java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:380)
... 29 more
Caused by: java.lang.ClassNotFoundException:
org.apache.servicecomb.foundation.auth.Cipher
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
... 34 more
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]