You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "bq-xiao (GitHub)" <gi...@apache.org> on 2019/09/10 11:31:20 UTC

[GitHub] [dubbo] bq-xiao commented on issue #5041: No matter how I set it, the version is always 0.0.0

**the same issue:**

Env:
```
maven:
<dependency>
            <groupId>org.apache.dubbo</groupId>
            <artifactId>dubbo-spring-boot-starter</artifactId>
            <version>2.7.3</version>
</dependency>

OS: windows10
JDK:1.8
```

1.Provider source code:
```
@Service(version = "demo", interfaceClass = HelloWorldService.class)
public class HelloWorldServiceImpl implements HelloWorldService {

    @Value("${dubbo.application.name}")
    private String serviceName;

    @Override
    public String sayHello(String name) {
        return String.format("[%s] : Hello, %s", serviceName, name);
    }
}
```

2.Consumer source code:
```
@RestController
@RequestMapping("/sample")
public class HelloWorldController {
    @Reference(version = "demo", url = "dubbo://127.0.0.1:12345")
    private HelloWorldService helloWorldService;

    @GetMapping(value = "/hello/{name}")
    @ResponseBody
    public String say(@PathVariable("name") String name) {
        return helloWorldService.sayHello(name);
    }
}
```
3.But get below error log
```
org.apache.dubbo.remoting.RemotingException: org.apache.dubbo.remoting.RemotingException: Not found exported service: com.example.dubbo.springboot.api.service.HelloWorldService:12345 in [com.example.dubbo.springboot.api.service.HelloWorldService:demo:12345], may be version or group mismatch , channel: consumer: /192.168.0.190:9410 --> provider: /192.168.0.190:12345, message:RpcInvocation [methodName=sayHello, parameterTypes=[class java.lang.String], arguments=[aa], attachments={path=com.example.dubbo.springboot.api.service.HelloWorldService, input=270, dubbo=2.0.2, interface=com.example.dubbo.springboot.api.service.HelloWorldService, version=0.0.0}]
org.apache.dubbo.remoting.RemotingException: Not found exported service: com.example.dubbo.springboot.api.service.HelloWorldService:12345 in [com.example.dubbo.springboot.api.service.HelloWorldService:demo:12345], may be version or group mismatch , channel: consumer: /192.168.0.190:9410 --> provider: /192.168.0.190:12345, message:RpcInvocation [methodName=sayHello, parameterTypes=[class java.lang.String], arguments=[aa], attachments={path=com.example.dubbo.springboot.api.service.HelloWorldService, input=270, dubbo=2.0.2, interface=com.example.dubbo.springboot.api.service.HelloWorldService, version=0.0.0}]
```


[ Full content available at: https://github.com/apache/dubbo/issues/5041 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org