Last active
July 16, 2020 01:04
-
-
Save richard1230/2d382a7cbb55cc45c0558c7676ff8bf5 to your computer and use it in GitHub Desktop.
Failed to check the status of the service com.github.api.rpc.OrderRpcService. No provider available for the service com.github.api.rpc.OrderRpcService:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
代码地址: | |
https://github.com/richard1230/wxshop/commit/8300339047f3f8b223bfb3adbebdda4499626557 | |
问题描述:运行OrderIntegrationTest没有任何问题,运行mvn clean verify会有报错如下: | |
``` | |
$mvn clean verify | |
[INFO] Scanning for projects... | |
[WARNING] | |
[WARNING] Some problems were encountered while building the effective model for com.github:wxshop-api:jar:0.0.1-SNAPSHOT | |
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: mysql:mysql-connector-java:jar -> duplicate declaration of version (?) @ line 29, column 25 | |
[WARNING] | |
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. | |
[WARNING] | |
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects. | |
[WARNING] | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] Reactor Build Order: | |
[INFO] | |
[INFO] wxshop-parent [pom] | |
[INFO] wxshop-api [jar] | |
[INFO] wxshop-main [jar] | |
[INFO] wxshop-order [jar] | |
[INFO] | |
[INFO] ----------------------< com.github:wxshop-parent >---------------------- | |
[INFO] Building wxshop-parent 0.0.1-SNAPSHOT [1/4] | |
[INFO] --------------------------------[ pom ]--------------------------------- | |
[INFO] | |
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ wxshop-parent --- | |
[INFO] | |
[INFO] -----------------------< com.github:wxshop-api >------------------------ | |
[INFO] Building wxshop-api 0.0.1-SNAPSHOT [2/4] | |
[INFO] --------------------------------[ jar ]--------------------------------- | |
[INFO] | |
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ wxshop-api --- | |
[INFO] Deleting /Users/mac/IdeaProjects/wxshop/wxshop-api/target | |
[INFO] | |
[INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ wxshop-api --- | |
[INFO] Using 'UTF-8' encoding to copy filtered resources. | |
[INFO] skip non existing resourceDirectory /Users/mac/IdeaProjects/wxshop/wxshop-api/src/main/resources | |
[INFO] skip non existing resourceDirectory /Users/mac/IdeaProjects/wxshop/wxshop-api/src/main/resources | |
[INFO] | |
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ wxshop-api --- | |
[INFO] Changes detected - recompiling the module! | |
[INFO] Compiling 10 source files to /Users/mac/IdeaProjects/wxshop/wxshop-api/target/classes | |
[INFO] | |
[INFO] --- maven-resources-plugin:3.1.0:testResources (default-testResources) @ wxshop-api --- | |
[INFO] Using 'UTF-8' encoding to copy filtered resources. | |
[INFO] skip non existing resourceDirectory /Users/mac/IdeaProjects/wxshop/wxshop-api/src/test/resources | |
[INFO] | |
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ wxshop-api --- | |
[INFO] No sources to compile | |
[INFO] | |
[INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ wxshop-api --- | |
[INFO] No tests to run. | |
[INFO] | |
[INFO] --- maven-jar-plugin:3.1.2:jar (default-jar) @ wxshop-api --- | |
[INFO] Building jar: /Users/mac/IdeaProjects/wxshop/wxshop-api/target/wxshop-api-0.0.1-SNAPSHOT.jar | |
[INFO] | |
[INFO] -----------------------< com.github:wxshop-main >----------------------- | |
[INFO] Building wxshop-main 0.0.1-SNAPSHOT [3/4] | |
[INFO] --------------------------------[ jar ]--------------------------------- | |
[INFO] | |
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ wxshop-main --- | |
[INFO] Deleting /Users/mac/IdeaProjects/wxshop/wxshop-main/target | |
[INFO] | |
[INFO] --- jacoco-maven-plugin:0.8.5:prepare-agent (default-prepare-agent) @ wxshop-main --- | |
[INFO] argLine set to -javaagent:/Users/mac/.m2/repository/org/jacoco/org.jacoco.agent/0.8.5/org.jacoco.agent-0.8.5-runtime.jar=destfile=/Users/mac/IdeaProjects/wxshop/wxshop-main/target/jacoco.exec | |
[INFO] | |
[INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ wxshop-main --- | |
[INFO] Using 'UTF-8' encoding to copy filtered resources. | |
[INFO] Copying 1 resource | |
[INFO] Copying 14 resources | |
[INFO] | |
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ wxshop-main --- | |
[INFO] Changes detected - recompiling the module! | |
[INFO] Compiling 42 source files to /Users/mac/IdeaProjects/wxshop/wxshop-main/target/classes | |
[INFO] | |
[INFO] --- maven-checkstyle-plugin:3.1.0:check (compile) @ wxshop-main --- | |
[INFO] | |
[INFO] --- maven-resources-plugin:3.1.0:testResources (default-testResources) @ wxshop-main --- | |
[INFO] Using 'UTF-8' encoding to copy filtered resources. | |
[INFO] Copying 1 resource | |
[INFO] | |
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ wxshop-main --- | |
[INFO] Changes detected - recompiling the module! | |
[INFO] Compiling 10 source files to /Users/mac/IdeaProjects/wxshop/wxshop-main/target/test-classes | |
[INFO] | |
[INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ wxshop-main --- | |
[INFO] | |
[INFO] ------------------------------------------------------- | |
[INFO] T E S T S | |
[INFO] ------------------------------------------------------- | |
[INFO] Running com.github.wxshop.WxshopApplicationTests | |
SLF4J: Class path contains multiple SLF4J bindings. | |
SLF4J: Found binding in [jar:file:/Users/mac/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar!/org/slf4j/impl/StaticLoggerBinder.class] | |
SLF4J: Found binding in [jar:file:/Users/mac/.m2/repository/org/apache/logging/log4j/log4j-slf4j-impl/2.13.1/log4j-slf4j-impl-2.13.1.jar!/org/slf4j/impl/StaticLoggerBinder.class] | |
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. | |
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder] | |
log4j:WARN No appenders could be found for logger (org.apache.dubbo.common.logger.LoggerFactory). | |
log4j:WARN Please initialize the log4j system properly. | |
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. | |
. ____ _ __ _ _ | |
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ | |
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ | |
\\/ ___)| |_)| | | | | || (_| | ) ) ) ) | |
' |____| .__|_| |_|_| |_\__, | / / / / | |
=========|_|==============|___/=/_/_/_/ | |
:: Spring Boot :: (v2.2.5.RELEASE) | |
2020-07-15 22:25:36.203 [main] ERROR org.springframework.boot.SpringApplication - Application run failed | |
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authController': Injection of @Reference dependencies is failed; nested exception is java.lang.IllegalStateException: Failed to check the status of the service com.github.api.rpc.OrderRpcService. No provider available for the service com.github.api.rpc.OrderRpcService:0.0.1 from the url zookeeper://127.0.0.1:2181/org.apache.dubbo.registry.RegistryService?application=wxshop-main&dubbo=2.0.2&init=false&interface=com.github.api.rpc.OrderRpcService&methods=createOrder&pid=54610&qos.enable=false®ister.ip=192.168.0.102&release=2.7.6&revision=0.0.1-SNAPSHOT&side=consumer&sticky=false×tamp=1594823135923&version=0.0.1 to the consumer 192.168.0.102 use dubbo version 2.7.6 | |
Caused by: java.lang.IllegalStateException: Failed to check the status of the service com.github.api.rpc.OrderRpcService. No provider available for the service com.github.api.rpc.OrderRpcService:0.0.1 from the url zookeeper://127.0.0.1:2181/org.apache.dubbo.registry.RegistryService?application=wxshop-main&dubbo=2.0.2&init=false&interface=com.github.api.rpc.OrderRpcService&methods=createOrder&pid=54610&qos.enable=false®ister.ip=192.168.0.102&release=2.7.6&revision=0.0.1-SNAPSHOT&side=consumer&sticky=false×tamp=1594823135923&version=0.0.1 to the consumer 192.168.0.102 use dubbo version 2.7.6 | |
at org.apache.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:349) | |
at org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:258) | |
at org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:158) | |
at org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.getOrCreateProxy(ReferenceAnnotationBeanPostProcessor.java:274) | |
at org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.doGetInjectedBean(ReferenceAnnotationBeanPostProcessor.java:143) | |
at com.alibaba.spring.beans.factory.annotation.AbstractAnnotationBeanPostProcessor.getInjectedObject(AbstractAnnotationBeanPostProcessor.java:359) | |
at com.alibaba.spring.beans.factory.annotation.AbstractAnnotationBeanPostProcessor$AnnotatedFieldElement.inject(AbstractAnnotationBeanPostProcessor.java:539) | |
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:130) | |
at com.alibaba.spring.beans.factory.annotation.AbstractAnnotationBeanPostProcessor.postProcessPropertyValues(AbstractAnnotationBeanPostProcessor.java:142) | |
... 81 common frames omitted | |
2020-07-15 22:25:36.209 [main] ERROR org.springframework.test.context.TestContextManager - Caught exception while allowing TestExecutionListener [org.springframework.test.context.web.ServletTestExecutionListener@44864ebe] to prepare test instance [com.github.wxshop.WxshopApplicationTests@1dcad16f] | |
j | |
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authController': Injection of @Reference dependencies is failed; nested exception is java.lang.IllegalStateException: Failed to check the status of the service com.github.api.rpc.OrderRpcService. No provider available for the service com.github.api.rpc.OrderRpcService:0.0.1 from the url zookeeper://127.0.0.1:2181/org.apache.dubbo.registry.RegistryService?application=wxshop-main&dubbo=2.0.2&init=false&interface=com.github.api.rpc.OrderRpcService&methods=createOrder&pid=54610&qos.enable=false®ister.ip=192.168.0.102&release=2.7.6&revision=0.0.1-SNAPSHOT&side=consumer&sticky=false×tamp=1594823135923&version=0.0.1 to the consumer 192.168.0.102 use dubbo version 2.7.6 | |
at com.alibaba.spring.beans.factory.annotation.AbstractAnnotationBeanPostProcessor.postProcessPropertyValues(AbstractAnnotationBeanPostProcessor.java:146) | |
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1427) | |
Caused by: java.lang.IllegalStateException: Failed to check the status of the service com.github.api.rpc.OrderRpcService. No provider available for the service com.github.api.rpc.OrderRpcService:0.0.1 from the url zookeeper://127.0.0.1:2181/org.apache.dubbo.registry.RegistryService?application=wxshop-main&dubbo=2.0.2&init=false&interface=com.github.api.rpc.OrderRpcService&methods=createOrder&pid=54610&qos.enable=false®ister.ip=192.168.0.102&release=2.7.6&revision=0.0.1-SNAPSHOT&side=consumer&sticky=false×tamp=1594823135923&version=0.0.1 to the consumer 192.168.0.102 use dubbo version 2.7.6 | |
at org.apache.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:349) | |
at org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:258) | |
at org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:158) | |
at org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.getOrCreateProxy(ReferenceAnnotationBeanPostProcessor.java:274) | |
at org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.doGetInjectedBean(ReferenceAnnotationBeanPostProcessor.java:143) | |
at com.alibaba.spring.beans.factory.annotation.AbstractAnnotationBeanPostProcessor.getInjectedObject(AbstractAnnotationBeanPostProcessor.java:359) | |
at com.alibaba.spring.beans.factory.annotation.AbstractAnnotationBeanPostProcessor$AnnotatedFieldElement.inject(AbstractAnnotationBeanPostProcessor.java:539) | |
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:130) | |
at com.alibaba.spring.beans.factory.annotation.AbstractAnnotationBeanPostProcessor.postProcessPropertyValues(AbstractAnnotationBeanPostProcessor.java:142) | |
... 81 common frames omitted | |
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 5.963 s <<< FAILURE! - in com.github.wxshop.WxshopApplicationTests | |
[ERROR] contextLoads Time elapsed: 0.003 s <<< ERROR! | |
java.lang.IllegalStateException: Failed to load ApplicationContext | |
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authController': Injection of @Reference dependencies is failed; nested exception is java.lang.IllegalStateException: Failed to check the status of the service com.github.api.rpc.OrderRpcService. No provider available for the service com.github.api.rpc.OrderRpcService:0.0.1 from the url zookeeper://127.0.0.1:2181/org.apache.dubbo.registry.RegistryService?application=wxshop-main&dubbo=2.0.2&init=false&interface=com.github.api.rpc.OrderRpcService&methods=createOrder&pid=54610&qos.enable=false®ister.ip=192.168.0.102&release=2.7.6&revision=0.0.1-SNAPSHOT&side=consumer&sticky=false×tamp=1594823135923&version=0.0.1 to the consumer 192.168.0.102 use dubbo version 2.7.6 | |
Caused by: java.lang.IllegalStateException: Failed to check the status of the service com.github.api.rpc.OrderRpcService. No provider available for the service com.github.api.rpc.OrderRpcService:0.0.1 from the url zookeeper://127.0.0.1:2181/org.apache.dubbo.registry.RegistryService?application=wxshop-main&dubbo=2.0.2&init=false&interface=com.github.api.rpc.OrderRpcService&methods=createOrder&pid=54610&qos.enable=false®ister.ip=192.168.0.102&release=2.7.6&revision=0.0.1-SNAPSHOT&side=consumer&sticky=false×tamp=1594823135923&version=0.0.1 to the consumer 192.168.0.102 use dubbo version 2.7.6 | |
[INFO] Running com.github.wxshop.generate.GoodsTest | |
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.076 s - in com.github.wxshop.generate.GoodsTest | |
[INFO] Running com.github.wxshop.service.TelVerificationServiceTest | |
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 s - in com.github.wxshop.service.TelVerificationServiceTest | |
[INFO] Running com.github.wxshop.service.GoodsIntegrationTest | |
. ____ _ __ _ _ | |
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ | |
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ | |
\\/ ___)| |_)| | | | | || (_| | ) ) ) ) | |
' |____| .__|_| |_|_| |_\__, | / / / / | |
=========|_|==============|___/=/_/_/_/ | |
:: Spring Boot :: (v2.2.5.RELEASE) | |
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.936 s - in com.github.wxshop.service.GoodsIntegrationTest | |
[INFO] Running com.github.wxshop.service.GoodsServiceTest | |
[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.699 s - in com.github.wxshop.service.GoodsServiceTest | |
[INFO] Running com.github.wxshop.service.AuthIntegrationTest | |
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.382 s - in com.github.wxshop.service.AuthIntegrationTest | |
[INFO] Running com.github.wxshop.service.OrderIntegrationTest | |
2020-07-15 22:25:47.324 [http-nio-auto-1-exec-5] ERROR com.github.wxshop.service.OrderService - 扣减库存失败, 商品id: 5,数量:6 | |
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.753 s - in com.github.wxshop.service.OrderIntegrationTest | |
[INFO] Running com.github.wxshop.service.ShoppingCartIntegrationTest | |
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.738 s - in com.github.wxshop.service.ShoppingCartIntegrationTest | |
[INFO] | |
[INFO] Results: | |
[INFO] | |
[ERROR] Errors: | |
[ERROR] WxshopApplicationTests.contextLoads » IllegalState Failed to load ApplicationC... | |
[INFO] | |
[ERROR] Tests run: 22, Failures: 0, Errors: 1, Skipped: 0 | |
[INFO] | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] Reactor Summary for wxshop-parent 0.0.1-SNAPSHOT: | |
[INFO] | |
[INFO] wxshop-parent ...................................... SUCCESS [ 0.224 s] | |
[INFO] wxshop-api ......................................... SUCCESS [ 2.049 s] | |
[INFO] wxshop-main ........................................ FAILURE [ 26.593 s] | |
[INFO] wxshop-order ....................................... SKIPPED | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] BUILD FAILURE | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] Total time: 29.157 s | |
[INFO] Finished at: 2020-07-15T22:25:51+08:00 | |
[INFO] ------------------------------------------------------------------------ | |
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project wxshop-main: There are test failures. | |
[ERROR] | |
[ERROR] Please refer to /Users/mac/IdeaProjects/wxshop/wxshop-main/target/surefire-reports for the individual test results. | |
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream. | |
[ERROR] -> [Help 1] | |
[ERROR] | |
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. | |
[ERROR] Re-run Maven using the -X switch to enable full debug logging. | |
[ERROR] | |
[ERROR] For more information about the errors and possible solutions, please read the following articles: | |
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException | |
[ERROR] | |
[ERROR] After correcting the problems, you can resume the build with the command | |
[ERROR] mvn <args> -rf :wxshop-main | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
开启的服务有:
