You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2021/03/11 09:20:53 UTC

[GitHub] [servicecomb-java-chassis] Pangzhihong opened a new issue #2293: 使用validator模块的时候,添加swagger-invocation-validator的pom依赖,启动报错 ,是不是有包的冲突?

Pangzhihong opened a new issue #2293:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2293


   Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'helloConsumerService' defined in file [D:\安全框架项目\yhs0092-demo-training21days-master\demo-training21days\helloworld-consumer\target\classes\microservice\demo\training21days\consumer\service\HelloConsumerService.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [microservice.demo.training21days.consumer.service.HelloConsumerService]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/core/log/LogDelegateFactory
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1105)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1050)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
   	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:197)
   	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:775)
   	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
   	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
   	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
   	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
   	at org.apache.servicecomb.foundation.common.utils.BeanUtils.init(BeanUtils.java:54)
   	at org.apache.servicecomb.foundation.common.utils.BeanUtils.init(BeanUtils.java:47)
   	at microservice.demo.training21days.consumer.AppMain.main(AppMain.java:7)
   Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [microservice.demo.training21days.consumer.service.HelloConsumerService]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/core/log/LogDelegateFactory
   	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:159)
   	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:89)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1098)
   	... 15 more
   Caused by: java.lang.NoClassDefFoundError: org/springframework/core/log/LogDelegateFactory
   	at org.springframework.http.HttpLogging.forLog(HttpLogging.java:68)
   	at org.springframework.http.HttpLogging.forLogName(HttpLogging.java:57)
   	at org.springframework.http.client.support.HttpAccessor.<init>(HttpAccessor.java:48)
   	at org.springframework.http.client.support.InterceptingHttpAccessor.<init>(InterceptingHttpAccessor.java:44)
   	at org.springframework.web.client.RestTemplate.<init>(RestTemplate.java:139)
   	at org.apache.servicecomb.provider.springmvc.reference.RestTemplateWrapper.<init>(RestTemplateWrapper.java:51)
   	at org.apache.servicecomb.provider.springmvc.reference.RestTemplateBuilder.<clinit>(RestTemplateBuilder.java:23)
   	at microservice.demo.training21days.consumer.service.HelloConsumerService.<init>(HelloConsumerService.java:33)
   	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:147)
   	... 17 more
   Caused by: java.lang.ClassNotFoundException: org.springframework.core.log.LogDelegateFactory
   	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
   	at java.lang.ClassLoader.loadClass(ClassLoader.java:419)
   	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
   	at java.lang.ClassLoader.loadClass(ClassLoader.java:352)
   	... 30 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:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #2293: 使用validator模块的时候,添加swagger-invocation-validator的pom依赖,启动报错 ,是不是有包的冲突?

Posted by GitBox <gi...@apache.org>.
liubao68 commented on issue #2293:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2293#issuecomment-796625403


   可以参考: http://servicecomb.apache.org/cn/docs/maven_dependency_management/
   
   排查下。 


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] Pangzhihong commented on issue #2293: 使用validator模块的时候,添加swagger-invocation-validator的pom依赖,启动报错 ,是不是有包的冲突?

Posted by GitBox <gi...@apache.org>.
Pangzhihong commented on issue #2293:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2293#issuecomment-797201862


   > 可以参考: http://servicecomb.apache.org/cn/docs/maven_dependency_management/
   > 
   > 排查下。
   
   嗯,是引入版本太高的问题


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] Pangzhihong commented on issue #2293: 使用validator模块的时候,添加swagger-invocation-validator的pom依赖,启动报错 ,是不是有包的冲突?

Posted by GitBox <gi...@apache.org>.
Pangzhihong commented on issue #2293:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2293#issuecomment-797202585


   +- **org.apache.servicecomb:swagger-invocation-validator:jar:1.2.0:compile**
   [INFO] | +- org.apache.servicecomb:swagger-invocation-core:jar:1.2.0:compile
   [INFO] | | +- com.google.inject:guice:jar:4.1.0:compile
   [INFO] | | | +- (javax.inject:javax.inject:jar:1:compile - omitted for duplicate)
   [INFO] | | | +- aopalliance:aopalliance:jar:1.0:compile
   [INFO] | | | - (com.google.guava:guava:jar:19.0:compile - omitted for conflict with 26.0-jre)
   [INFO] | | +- org.apache.servicecomb:swagger-generator-core:jar:1.2.0:compile
   [INFO] | | | +- io.swagger:swagger-core:jar:1.5.22:compile
   [INFO] | | | | +- (org.apache.commons:commons-lang3:jar:3.2.1:compile - omitted for conflict with 3.9)
   [INFO] | | | | +- (org.slf4j:slf4j-api:jar:1.7.22:compile - omitted for conflict with 1.7.25)
   [INFO] | | | | +- (com.fasterxml.jackson.core:jackson-annotations:jar:2.9.8:compile - omitted for conflict with 2.9.9)
   [INFO] | | | | +- (com.fasterxml.jackson.core:jackson-databind:jar:2.9.8:compile - omitted for conflict with 2.9.9.2)
   [INFO] | | | | +- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.9.8:compile
   [INFO] | | | | | +- (org.yaml:snakeyaml:jar:1.23:compile - omitted for conflict with 1.23)
   [INFO] | | | | | - (com.fasterxml.jackson.core:jackson-core:jar:2.9.8:compile - omitted for conflict with 2.9.10)
   [INFO] | | | | +- io.swagger:swagger-models:jar:1.5.22:compile
   [INFO] | | | | | +- (com.fasterxml.jackson.core:jackson-annotations:jar:2.9.8:compile - omitted for conflict with 2.9.9)
   [INFO] | | | | | +- (org.slf4j:slf4j-api:jar:1.7.22:compile - omitted for conflict with 1.7.25)
   [INFO] | | | | | - io.swagger:swagger-annotations:jar:1.5.22:compile
   [INFO] | | | | +- (com.google.guava:guava:jar:27.0.1-android:compile - omitted for conflict with 26.0-jre)
   [INFO] | | | | - (javax.validation:validation-api:jar:1.1.0.Final:compile - omitted for conflict with 2.0.0.Final)
   [INFO] | | | +- (org.apache.servicecomb:foundation-common:jar:1.2.0:compile - omitted for conflict with 1.0.0.B003.H98)
   [INFO] | | | +- org.apache.servicecomb:common-javassist:jar:1.2.0:compile
   [INFO] | | | | +- org.javassist:javassist:jar:3.18.1-GA:compile
   [INFO] | | | | - (org.apache.servicecomb:foundation-common:jar:1.2.0:compile - omitted for conflict with 1.0.0.B003.H98)
   **[INFO] | | | +- (javax.servlet:javax.servlet-api:jar:3.1.0:compile - omitted for duplicate)**
   [INFO] | | | - (com.google.inject:guice:jar:4.1.0:compile - omitted for duplicate)
   [INFO] | | +- (org.apache.servicecomb:swagger-generator-jaxrs:jar:1.2.0:compile - omitted for conflict with 1.0.0.B003.H98)
   [INFO] | | - org.springframework:spring-web:jar:4.3.20.RELEASE:compile
   [INFO] | | +- org.springframework:spring-aop:jar:4.3.20.RELEASE:compile
   [INFO] | | | +- (org.springframework:spring-beans:jar:4.3.20.RELEASE:compile - omitted for conflict with 4.3.1.RELEASE)
   [INFO] | | | - (org.springframework:spring-core:jar:4.3.20.RELEASE:compile - omitted for conflict with 4.3.1.RELEASE)
   [INFO] | | +- (org.springframework:spring-beans:jar:4.3.20.RELEASE:compile - omitted for conflict with 4.3.1.RELEASE)
   [INFO] | | +- (org.springframework:spring-context:jar:4.3.20.RELEASE:compile - omitted for conflict with 4.3.22.RELEASE)
   [INFO] | | - (org.springframework:spring-core:jar:4.3.20.RELEASE:compile - omitted for conflict with 4.3.1.RELEASE)
   [INFO] | +- org.hibernate.validator:hibernate-validator:jar:6.0.2.Final:compile
   [INFO] | | +- javax.validation:validation-api:jar:2.0.0.Final:compile
   [INFO] | | +- org.jboss.logging:jboss-logging:jar:3.3.0.Final:compile
   [INFO] | | - com.fasterxml:classmate:jar:1.3.1:compile
   [INFO] | - org.glassfish:javax.el:jar:3.0.0:compile
   
   validator模块的包为啥会依赖servlet的包,说明validator只能应用到servlet模式吗,vertx模式能不能用?


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] Pangzhihong commented on issue #2293: 使用validator模块的时候,添加swagger-invocation-validator的pom依赖,启动报错 ,是不是有包的冲突?

Posted by GitBox <gi...@apache.org>.
Pangzhihong commented on issue #2293:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2293#issuecomment-797202325


   +- org.apache.servicecomb:swagger-invocation-validator:jar:1.2.0:compile
   [INFO] |  +- org.apache.servicecomb:swagger-invocation-core:jar:1.2.0:compile
   [INFO] |  |  +- com.google.inject:guice:jar:4.1.0:compile
   [INFO] |  |  |  +- (javax.inject:javax.inject:jar:1:compile - omitted for duplicate)
   [INFO] |  |  |  +- aopalliance:aopalliance:jar:1.0:compile
   [INFO] |  |  |  \- (com.google.guava:guava:jar:19.0:compile - omitted for conflict with 26.0-jre)
   [INFO] |  |  +- org.apache.servicecomb:swagger-generator-core:jar:1.2.0:compile
   [INFO] |  |  |  +- io.swagger:swagger-core:jar:1.5.22:compile
   [INFO] |  |  |  |  +- (org.apache.commons:commons-lang3:jar:3.2.1:compile - omitted for conflict with 3.9)
   [INFO] |  |  |  |  +- (org.slf4j:slf4j-api:jar:1.7.22:compile - omitted for conflict with 1.7.25)
   [INFO] |  |  |  |  +- (com.fasterxml.jackson.core:jackson-annotations:jar:2.9.8:compile - omitted for conflict with 2.9.9)
   [INFO] |  |  |  |  +- (com.fasterxml.jackson.core:jackson-databind:jar:2.9.8:compile - omitted for conflict with 2.9.9.2)
   [INFO] |  |  |  |  +- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.9.8:compile
   [INFO] |  |  |  |  |  +- (org.yaml:snakeyaml:jar:1.23:compile - omitted for conflict with 1.23)
   [INFO] |  |  |  |  |  \- (com.fasterxml.jackson.core:jackson-core:jar:2.9.8:compile - omitted for conflict with 2.9.10)
   [INFO] |  |  |  |  +- io.swagger:swagger-models:jar:1.5.22:compile
   [INFO] |  |  |  |  |  +- (com.fasterxml.jackson.core:jackson-annotations:jar:2.9.8:compile - omitted for conflict with 2.9.9)
   [INFO] |  |  |  |  |  +- (org.slf4j:slf4j-api:jar:1.7.22:compile - omitted for conflict with 1.7.25)
   [INFO] |  |  |  |  |  \- io.swagger:swagger-annotations:jar:1.5.22:compile
   [INFO] |  |  |  |  +- (com.google.guava:guava:jar:27.0.1-android:compile - omitted for conflict with 26.0-jre)
   [INFO] |  |  |  |  \- (javax.validation:validation-api:jar:1.1.0.Final:compile - omitted for conflict with 2.0.0.Final)
   [INFO] |  |  |  +- (org.apache.servicecomb:foundation-common:jar:1.2.0:compile - omitted for conflict with 1.0.0.B003.H98)
   [INFO] |  |  |  +- org.apache.servicecomb:common-javassist:jar:1.2.0:compile
   [INFO] |  |  |  |  +- org.javassist:javassist:jar:3.18.1-GA:compile
   [INFO] |  |  |  |  \- (org.apache.servicecomb:foundation-common:jar:1.2.0:compile - omitted for conflict with 1.0.0.B003.H98)
   [INFO] |  |  |  +- (javax.servlet:javax.servlet-api:jar:3.1.0:compile - omitted for duplicate)
   [INFO] |  |  |  \- (com.google.inject:guice:jar:4.1.0:compile - omitted for duplicate)
   [INFO] |  |  +- (org.apache.servicecomb:swagger-generator-jaxrs:jar:1.2.0:compile - omitted for conflict with 1.0.0.B003.H98)
   [INFO] |  |  \- org.springframework:spring-web:jar:4.3.20.RELEASE:compile
   [INFO] |  |     +- org.springframework:spring-aop:jar:4.3.20.RELEASE:compile
   [INFO] |  |     |  +- (org.springframework:spring-beans:jar:4.3.20.RELEASE:compile - omitted for conflict with 4.3.1.RELEASE)
   [INFO] |  |     |  \- (org.springframework:spring-core:jar:4.3.20.RELEASE:compile - omitted for conflict with 4.3.1.RELEASE)
   [INFO] |  |     +- (org.springframework:spring-beans:jar:4.3.20.RELEASE:compile - omitted for conflict with 4.3.1.RELEASE)
   [INFO] |  |     +- (org.springframework:spring-context:jar:4.3.20.RELEASE:compile - omitted for conflict with 4.3.22.RELEASE)
   [INFO] |  |     \- (org.springframework:spring-core:jar:4.3.20.RELEASE:compile - omitted for conflict with 4.3.1.RELEASE)
   [INFO] |  +- org.hibernate.validator:hibernate-validator:jar:6.0.2.Final:compile
   [INFO] |  |  +- javax.validation:validation-api:jar:2.0.0.Final:compile
   [INFO] |  |  +- org.jboss.logging:jboss-logging:jar:3.3.0.Final:compile
   [INFO] |  |  \- com.fasterxml:classmate:jar:1.3.1:compile
   [INFO] |  \- org.glassfish:javax.el:jar:3.0.0:compile
   
   validator模块的包为啥会依赖servlet的包,说明validator只能应用到servlet模式吗,vertx模式能不能用? 
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] Pangzhihong removed a comment on issue #2293: 使用validator模块的时候,添加swagger-invocation-validator的pom依赖,启动报错 ,是不是有包的冲突?

Posted by GitBox <gi...@apache.org>.
Pangzhihong removed a comment on issue #2293:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2293#issuecomment-797202325


   +- org.apache.servicecomb:swagger-invocation-validator:jar:1.2.0:compile
   [INFO] |  +- org.apache.servicecomb:swagger-invocation-core:jar:1.2.0:compile
   [INFO] |  |  +- com.google.inject:guice:jar:4.1.0:compile
   [INFO] |  |  |  +- (javax.inject:javax.inject:jar:1:compile - omitted for duplicate)
   [INFO] |  |  |  +- aopalliance:aopalliance:jar:1.0:compile
   [INFO] |  |  |  \- (com.google.guava:guava:jar:19.0:compile - omitted for conflict with 26.0-jre)
   [INFO] |  |  +- org.apache.servicecomb:swagger-generator-core:jar:1.2.0:compile
   [INFO] |  |  |  +- io.swagger:swagger-core:jar:1.5.22:compile
   [INFO] |  |  |  |  +- (org.apache.commons:commons-lang3:jar:3.2.1:compile - omitted for conflict with 3.9)
   [INFO] |  |  |  |  +- (org.slf4j:slf4j-api:jar:1.7.22:compile - omitted for conflict with 1.7.25)
   [INFO] |  |  |  |  +- (com.fasterxml.jackson.core:jackson-annotations:jar:2.9.8:compile - omitted for conflict with 2.9.9)
   [INFO] |  |  |  |  +- (com.fasterxml.jackson.core:jackson-databind:jar:2.9.8:compile - omitted for conflict with 2.9.9.2)
   [INFO] |  |  |  |  +- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.9.8:compile
   [INFO] |  |  |  |  |  +- (org.yaml:snakeyaml:jar:1.23:compile - omitted for conflict with 1.23)
   [INFO] |  |  |  |  |  \- (com.fasterxml.jackson.core:jackson-core:jar:2.9.8:compile - omitted for conflict with 2.9.10)
   [INFO] |  |  |  |  +- io.swagger:swagger-models:jar:1.5.22:compile
   [INFO] |  |  |  |  |  +- (com.fasterxml.jackson.core:jackson-annotations:jar:2.9.8:compile - omitted for conflict with 2.9.9)
   [INFO] |  |  |  |  |  +- (org.slf4j:slf4j-api:jar:1.7.22:compile - omitted for conflict with 1.7.25)
   [INFO] |  |  |  |  |  \- io.swagger:swagger-annotations:jar:1.5.22:compile
   [INFO] |  |  |  |  +- (com.google.guava:guava:jar:27.0.1-android:compile - omitted for conflict with 26.0-jre)
   [INFO] |  |  |  |  \- (javax.validation:validation-api:jar:1.1.0.Final:compile - omitted for conflict with 2.0.0.Final)
   [INFO] |  |  |  +- (org.apache.servicecomb:foundation-common:jar:1.2.0:compile - omitted for conflict with 1.0.0.B003.H98)
   [INFO] |  |  |  +- org.apache.servicecomb:common-javassist:jar:1.2.0:compile
   [INFO] |  |  |  |  +- org.javassist:javassist:jar:3.18.1-GA:compile
   [INFO] |  |  |  |  \- (org.apache.servicecomb:foundation-common:jar:1.2.0:compile - omitted for conflict with 1.0.0.B003.H98)
   [INFO] |  |  |  +- (javax.servlet:javax.servlet-api:jar:3.1.0:compile - omitted for duplicate)
   [INFO] |  |  |  \- (com.google.inject:guice:jar:4.1.0:compile - omitted for duplicate)
   [INFO] |  |  +- (org.apache.servicecomb:swagger-generator-jaxrs:jar:1.2.0:compile - omitted for conflict with 1.0.0.B003.H98)
   [INFO] |  |  \- org.springframework:spring-web:jar:4.3.20.RELEASE:compile
   [INFO] |  |     +- org.springframework:spring-aop:jar:4.3.20.RELEASE:compile
   [INFO] |  |     |  +- (org.springframework:spring-beans:jar:4.3.20.RELEASE:compile - omitted for conflict with 4.3.1.RELEASE)
   [INFO] |  |     |  \- (org.springframework:spring-core:jar:4.3.20.RELEASE:compile - omitted for conflict with 4.3.1.RELEASE)
   [INFO] |  |     +- (org.springframework:spring-beans:jar:4.3.20.RELEASE:compile - omitted for conflict with 4.3.1.RELEASE)
   [INFO] |  |     +- (org.springframework:spring-context:jar:4.3.20.RELEASE:compile - omitted for conflict with 4.3.22.RELEASE)
   [INFO] |  |     \- (org.springframework:spring-core:jar:4.3.20.RELEASE:compile - omitted for conflict with 4.3.1.RELEASE)
   [INFO] |  +- org.hibernate.validator:hibernate-validator:jar:6.0.2.Final:compile
   [INFO] |  |  +- javax.validation:validation-api:jar:2.0.0.Final:compile
   [INFO] |  |  +- org.jboss.logging:jboss-logging:jar:3.3.0.Final:compile
   [INFO] |  |  \- com.fasterxml:classmate:jar:1.3.1:compile
   [INFO] |  \- org.glassfish:javax.el:jar:3.0.0:compile
   
   validator模块的包为啥会依赖servlet的包,说明validator只能应用到servlet模式吗,vertx模式能不能用? 
   


----------------------------------------------------------------
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:
users@infra.apache.org