Closed galaxy2000 closed 6 years ago
+1
+1
@galaxy2000 @c297186864 @neesonqk
For now, dubbo-spring-boot-starter will separate two versions for Spring Boot 2.x and 1.x once release :
0.2.x is a main stream release version for Spring Boot 2.x
0.1.x is a legacy version for maintaining Spring Boot 1.x
Please wait for final release or pull code from branch 0.2.0 and compile yourself.
It was two weeks ago that it was going to go online. But the delay has not been known for any reason.
@c297186864 sorry for waiting, for now, Dubbo is an incubator apache project , thus release will become slow.
@suclogger Unable to compile 0.2.0, see this
and this,
Changing version to 2.5.10 or any other higher version doesn't seem to solve this problem, please help!
Thanks.
I searched around but, unfortunately there seems isn't a version 2.5.11 even existing on anywhere, we're trying to compile and integrate into our spring boot 2 project, any help will be much appreciated, thank you.
@suclogger @mercyblitz
@neesonqk Please refer to #96 .
@suclogger thanks a ton! I'm able to compile now.
@suclogger I know it's quite annoying, but do you have any idea that once any changes applied to the working simple, it stops to work anymore.
I'm able to run your official simples (provider vs consumer) like a charm, however, I'd like to tweak that simple to work with my own scenario, the thing is, no matter how do I follow the exact simple, it never work even just the class name changes, I'm frustrated.
This is the exception:
com.alibaba.dubbo.remoting.RemotingException: Not found exported service: com.ont.palm.rpc.EchoService:1.0.0:12345 in [com.ont.messager.rpc.EchoService:1.0.0:12345], may be version or group mismatch , channel: consumer: /20.20.20.20:56722 --> provider: /20.20.20.20:12345, message:RpcInvocation [methodName=greet, parameterTypes=[], arguments=[], attachments={path=com.ont.palm.rpc.EchoService, input=153, dubbo=2.0.1, interface=com.ont.palm.rpc.EchoService, version=1.0.0}]
at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.getInvoker(DubboProtocol.java:202)
at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol$1.reply(DubboProtocol.java:73)
at com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.handleRequest(HeaderExchangeHandler.java:96)
at com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.received(HeaderExchangeHandler.java:168)
at com.alibaba.dubbo.remoting.transport.DecodeHandler.received(DecodeHandler.java:50)
at com.alibaba.dubbo.remoting.transport.dispatcher.ChannelEventRunnable.run(ChannelEventRunnable.java:79)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
] with root cause
My provider and its interface:
Configuration:
# Spring boot application
spring.application.name = messager-provider-app
server.port = 9090
# DemoService service version
messager.service.version = 1.0.0
# Base packages to scan Dubbo Components (e.g @Service , @Reference)
dubbo.scan.basePackages = com.ont.messager.rpc
# Dubbo Config properties
## ApplicationConfig Bean
dubbo.application.id = messager-provider
dubbo.application.name = messager-provider
#dubbo.application.qos.port=22222
#dubbo.application.qos.enable=true
## ProtocolConfig Bean
dubbo.protocol.id = dubbo
dubbo.protocol.name = dubbo
dubbo.protocol.port = 12345
dubbo.protocol.status = server
## RegistryConfig Bean
dubbo.registry.id = my-registry
dubbo.registry.address = N/A
My consumer:
# Spring boot application
spring.application.name = dubbo-consumer-demo
server.port = 8080
management.server.port = 8081
# DemoService service version
messager.service.version = 1.0.0
# Dubbo Config properties
## ApplicationConfig Bean
dubbo.application.id = dubbo-consumer-demo
dubbo.application.name = dubbo-consumer-demo
## Legacy QOS Config
dubbo.qos.port = 22223
## ProtocolConfig Bean
dubbo.protocol.id = dubbo
dubbo.protocol.name = dubbo
dubbo.protocol.port = 12345
# Dubbo Endpoint (default status is disable)
endpoints.dubbo.enabled = true
Any idea? Thanks a lot.
@neesonqk As far as I can see, maybe you didn't start provider before your try to consume?
@suclogger I'm very sure that I've started the provider ahead of the consumer. I'll try to reproduce the same problem from your official simples and tweat there, if encountered the same problem, I'll post up here tmr.
Thank you and much appreciated!
@suclogger I've modified your official example, just created a new interface and it's implementation, then comment out your DefaultDemoService, then it stopped to work anymore, please help to take a look, thank you!
I think I've found the problem, regarding the interface between provider and consumer, it has to be in the same package path, which means for both sides, assume MyInterface
locates at A.B.C this package in provider, then it has to be placed to the excatly same structured package A.B.C in consumer as well. My problem is I put them into different paths, and those paths are part of the services looking for.
@suclogger Any best practices to organize/share the interfaces between providers and consumers?
@neesonqk Usually, the interface class definition is published by provider as a maven dependency. Consumer should import the interface class rather than define it again himself.
Cool! @suclogger
Checkout master and build source , please wait for our release in Apache repository.
I got the follow exception stack with SpringBoot 2.0,
the pom.xml