Skip to content

[Bug] Unsupported IDL filename: message.proto #15410

@hu-chia

Description

@hu-chia

Pre-check

  • I am sure that all the content I provide is in English.

Search before asking

  • I had searched in the issues and found no similar issues.

Apache Dubbo Component

Java SDK (apache/dubbo)

Dubbo Version

Dubbo Java 3.3.4, Java 21, macOS 15.5

Steps to reproduce this issue

Generated source code Dubbo<ServiceName>Triple has a conflict class usage when the proto file name is message.proto, which generates a Message.java, it's conflicted with the protobuf buildin class, dubbo doesn't handle the full class name correctly, the static code generated by dubbo use the simple class name.

public final class DubboServiceNameTriple {

    public static final String SERVICE_NAME = ServiceName.SERVICE_NAME;

    private static final StubServiceDescriptor serviceDescriptor = new StubServiceDescriptor(SERVICE_NAME, ServiceName.class);

    static {
        org.apache.dubbo.rpc.protocol.tri.service.SchemaDescriptorRegistry.addSchemaDescriptor(SERVICE_NAME, Message.getDescriptor()); // !!!
        StubSuppliers.addSupplier(SERVICE_NAME, DubboServiceNameTriple::newStub);
        StubSuppliers.addSupplier(ServiceName.JAVA_SERVICE_NAME,  DubboServiceNameTriple::newStub);
        StubSuppliers.addDescriptor(SERVICE_NAME, serviceDescriptor);
        StubSuppliers.addDescriptor(ServiceName.JAVA_SERVICE_NAME, serviceDescriptor);
    }

What you expected to happen

Handle the generated code class name correctly.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedEverything needs help from contributorstype/enhancementEverything related with code enhancement or performance

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions