apache / dubbo

The java implementation of Apache Dubbo. An RPC and microservice framework.
https://dubbo.apache.org/
Apache License 2.0
40.55k stars 26.44k forks source link

[Bug] Build failed after relying on version 3.2.11 or later #14168

Open Alleninggx opened 6 months ago

Alleninggx commented 6 months ago

Pre-check

Search before asking

Apache Dubbo Component

Java SDK (apache/dubbo)

Dubbo Version

Dubbo java 3.2.11 to 3.3.3 Java 21 Spring Boot 3.2.5 Alibaba Spring Cloud 2023.0.0.0-RC1 Seata 2.0 Nacos

Steps to reproduce this issue

Error message: constructor StubMethodDescriptor in class org.apache.dubbo.rpc.model.StubMethodDescriptor cannot be applied to given types;

image

What you expected to happen

use Dubbo java 3.2.10 is ok.

Anything else

No response

Are you willing to submit a pull request to fix on your own?

Code of Conduct

Alleninggx commented 6 months ago

The test version 3.2.10 is normal. 3.2.11 to 3.3.x does not work.

Alleninggx commented 6 months ago

I found out it was Dubbo Complier, it needs to synchronize the version of Dubbo Java.

Then I discovered another problem, this is an error after the application is started: image image

java.lang.IllegalStateException: Not found class com.ligong.mes.system.api.dubbo.DubboIFileResourceDubboGrpcTriple, cause: com.ligong.mes.system.api.dubbo.DubboIFileResourceDubboGrpcTriple
    at org.apache.dubbo.common.utils.ReflectUtils.forName(ReflectUtils.java:690)
    at org.apache.dubbo.rpc.stub.StubSuppliers.getServiceDescriptor(StubSuppliers.java:61)
    at org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:350)
    at org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:241)
    at org.apache.dubbo.config.ReferenceConfigBase.get(ReferenceConfigBase.java:399)
    at org.apache.dubbo.config.utils.SimpleReferenceCache.destroyReference(SimpleReferenceCache.java:294)
    at org.apache.dubbo.config.utils.SimpleReferenceCache.destroy(SimpleReferenceCache.java:248)
    at org.apache.dubbo.config.utils.SimpleReferenceCache.destroy(SimpleReferenceCache.java:271)
    at org.apache.dubbo.config.deploy.DefaultModuleDeployer.lambda$referServices$6(DefaultModuleDeployer.java:577)
    at java.base/java.util.concurrent.ConcurrentHashMap$ValuesView.forEach(ConcurrentHashMap.java:4783)
    at org.apache.dubbo.config.deploy.DefaultModuleDeployer.referServices(DefaultModuleDeployer.java:539)
    at org.apache.dubbo.config.deploy.DefaultModuleDeployer.startSync(DefaultModuleDeployer.java:186)
    at org.apache.dubbo.config.deploy.DefaultModuleDeployer.start(DefaultModuleDeployer.java:159)
    at org.apache.dubbo.config.spring.context.DubboDeployApplicationListener.onContextRefreshedEvent(DubboDeployApplicationListener.java:167)
    at org.apache.dubbo.config.spring.context.DubboDeployApplicationListener.onApplicationEvent(DubboDeployApplicationListener.java:153)
    at org.apache.dubbo.config.spring.context.DubboDeployApplicationListener.onApplicationEvent(DubboDeployApplicationListener.java:52)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:185)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:178)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:156)
    at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:451)
    at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:384)
    at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:984)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:627)
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146)
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754)
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:334)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343)
AlbumenJ commented 6 months ago

@EarthChen PTAL

walklown commented 6 months ago

I failed to reproduce successfully, using dubbo version 3.3.0-beta.2 and springboot version 3.2.5. Could you please provide more detailed information? It would be best to have a demo. (3.3.0-beta.2 should be the latest released version, which one is 3.3.3 ?)

My demo: https://github.com/walklown/dubbo-pr-test/tree/main/try-recurrent-1