Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Triple unable to find class #14451

Open
1 of 2 tasks
Alleninggx opened this issue Jul 19, 2024 · 3 comments
Open
1 of 2 tasks

[Bug] Triple unable to find class #14451

Alleninggx opened this issue Jul 19, 2024 · 3 comments
Labels
component/need-triage Need maintainers to triage type/need-triage Need maintainers to triage

Comments

@Alleninggx
Copy link

Alleninggx commented Jul 19, 2024

Dubbo Version

Dubbo java 3.2.14

Steps to reproduce this issue

image
image

我有一个tri类型的接口,但是我不是直接实现dubbo生成的接口类,而是自定义了一个接口(IFileResourceDubboGrpc),然后这个接口再继承Dubbo生成的接口(FileResourceDubboGrpc)。

I have an interface whose protocol is tri, but instead of directly implementing the dubbo generated interface class, I have a custom interface (IFileResourceDubboGrpc), which then extends the Dubbo generated interface (FileResourceDubboGrpc).

关系就是:FileResourceDubboGrpcImpl --实现--> IFileResourceDubboGrpc --继承--> FileResourceDubboGrpc

Like this:FileResourceDubboGrpcImpl --interface--> IFileResourceDubboGrpc --extends--> FileResourceDubboGrpc

这个在3.2.5版本左右,是正常的,然后我升级到3.2.14后,这个方式就没办法用了。

This is normal around version 3.2.5, and then after I upgraded to 3.2.14, this method can not be used.

现在是否只能是直接实现dubbo生成的接口了?

Now, what else can I do but implement this class directly?

What you expected to happen

获取接口的方式变了?

I haven't read the code in detail yet

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:347)
	at org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:238)
	at org.apache.dubbo.config.ReferenceConfigBase.get(ReferenceConfigBase.java:395)
	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:555)
	at java.base/java.util.concurrent.ConcurrentHashMap$ValuesView.forEach(ConcurrentHashMap.java:4783)
	at org.apache.dubbo.config.deploy.DefaultModuleDeployer.referServices(DefaultModuleDeployer.java:517)
	at org.apache.dubbo.config.deploy.DefaultModuleDeployer.startSync(DefaultModuleDeployer.java:183)
	at org.apache.dubbo.config.deploy.DefaultModuleDeployer.start(DefaultModuleDeployer.java:156)
	at org.apache.dubbo.config.spring.context.DubboDeployApplicationListener.onContextRefreshedEvent(DubboDeployApplicationListener.java:157)
	at org.apache.dubbo.config.spring.context.DubboDeployApplicationListener.onApplicationEvent(DubboDeployApplicationListener.java:143)
	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:452)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:385)
	at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:993)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:628)
	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:335)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1363)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1352)
	at com.ligong.mes.equipment.server.EquipmentServerApplication.main(EquipmentServerApplication.java:23)

Anything else

No response

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

  • Yes I am willing to submit a pull request on my own!

Code of Conduct

@Alleninggx Alleninggx added component/need-triage Need maintainers to triage type/need-triage Need maintainers to triage labels Jul 19, 2024
@heliang666s
Copy link
Contributor

Thank you in English please.

@Alleninggx
Copy link
Author

Thank you in English please.

In short, it involves catching exceptions thrown by service interface classes when using the triple protocol.

please only read the English in the issue, the Chinese content is only a translated, it is as same as the English content.

@AlbumenJ AlbumenJ changed the title [Bug] 关于拼接Triple类名导致无法找到类的问题 [Bug] Triple unable to find class Jul 23, 2024
@AlbumenJ
Copy link
Member

@EarthChen PTAL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/need-triage Need maintainers to triage type/need-triage Need maintainers to triage
Projects
Status: Todo
Development

No branches or pull requests

3 participants