apache / dubbo

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

[Bug] Compile native, not support generic invoke #14499

Closed eye-gu closed 1 month ago

eye-gu commented 2 months ago

Pre-check

Search before asking

Apache Dubbo Component

Java SDK (apache/dubbo)

Dubbo Version

Dubbo version : 3.3.0-beta.1

Steps to reproduce this issue

Compile native, not support generic invoke

What you expected to happen

Compile native, support generic invoke

Anything else

When the dubbo Maven plugin performs AOT preprocessing, there are no generic interfaces in the created proxy-config.json file

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

Code of Conduct

AlbumenJ commented 2 months ago

There is no need to add GenericService to proxy-config.json

eye-gu commented 2 months ago

There is no need to add GenericService to proxy-config.json

The exception is: com.oracle.svm.core.jdk.UnsupportedFeatureError: Proxy class defined by interfaces [interface com.alibaba.dubbo.rpc.service.GenericService, interface org.apache.dubbo.rpc.service.GenericService, interface org.apache.dubbo.rpc.service.EchoService, interface org.apache.dubbo.rpc.service.Destroyable] not found. Generating proxy classes at runtime is not supported. Proxy classes need to be defined at image build time by specifying the list of interfaces that they implement.

Add a proxy-config.json file, The content is:

[
  {
    "interfaces": [
      "com.alibaba.dubbo.rpc.service.GenericService",
      "org.apache.dubbo.rpc.service.GenericService",
      "org.apache.dubbo.rpc.service.EchoService",
      "org.apache.dubbo.rpc.service.Destroyable"
    ]
  }
]

Successfully initiated generic invoke.

AlbumenJ commented 2 months ago

There is no need to add GenericService to proxy-config.json

The exception is: com.oracle.svm.core.jdk.UnsupportedFeatureError: Proxy class defined by interfaces [interface com.alibaba.dubbo.rpc.service.GenericService, interface org.apache.dubbo.rpc.service.GenericService, interface org.apache.dubbo.rpc.service.EchoService, interface org.apache.dubbo.rpc.service.Destroyable] not found. Generating proxy classes at runtime is not supported. Proxy classes need to be defined at image build time by specifying the list of interfaces that they implement.

Add a proxy-config.json file, The content is:

[
  {
    "interfaces": [
      "com.alibaba.dubbo.rpc.service.GenericService",
      "org.apache.dubbo.rpc.service.GenericService",
      "org.apache.dubbo.rpc.service.EchoService",
      "org.apache.dubbo.rpc.service.Destroyable"
    ]
  }
]

Successfully initiated generic invoke.

@CrazyHZM PTAL