Environment
- Dubbo version: 3.0.9
- Operating System version: Ubuntu 20.04
- Java version: OpenJDK Runtime Environment GraalVM CE 22.1.0 (build 17.0.3+7-jvmci-22.1-b06)
Steps to reproduce this issue
- Install GraalVM CE Java17 22.1.0 ( https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.1.0/graalvm-ce-java17-linux-amd64-22.1.0.tar.gz )
- Clone the official dubbo repo (
git clone git@github.com:apache/dubbo.git
) - Checkout to 3.0.9 version (
git checkout dubbo-3.0.9
) - Build the dubbo-demo-native-provider (run
./mvnw -U clean package -pl dubbo-build-tools -pl dubbo-demo/dubbo-demo-native/dubbo-demo-native-interface -pl dubbo-demo/dubbo-demo-native/dubbo-demo-native-provider -P native -Dmaven.test.skip=true -Dcheckstyle.skip=true
) - Run the zookeper (
docker-compose up -d
, docker-compose.yml is below) - Run the native app dubbo-demo-native-provider (run
./dubbo-demo/dubbo-demo-native/dubbo-demo-native-provider/target/demo-native-provider
)
docker-compose.yml for zookeper
version: '3.0'
services:
zookeeper:
image: zookeeper:3.8.0
container_name: zookeeper
networks:
- abnet
ports:
- '2181:2181'
environment:
- 'ZOOKEEPER_CLIENT_PORT=2181'
- 'ZOOKEEPER_TICK_TIME=2000'
networks:
abnet:
driver: bridge
Expected Behavior
The dubbo-demo-native-provider is started successfully.
Actual Behavior
The exception is raised: IllegalStateException: No adaptive method exist on extension org.apache.dubbo.common.extension.ExtensionInjector, refuse to create the adaptive class!
Full stacktrace:
$ ./dubbo-demo/dubbo-demo-native/dubbo-demo-native-provider/target/demo-native-provider
Exception in thread "main" java.lang.IllegalStateException: Failed to create adaptive instance: java.lang.IllegalStateException: Can't create adaptive extension interface org.apache.dubbo.common.extension.ExtensionInjector, cause: No adaptive method exist on extension org.apache.dubbo.common.extension.ExtensionInjector, refuse to create the adaptive class!
at org.apache.dubbo.common.extension.ExtensionLoader.getAdaptiveExtension(ExtensionLoader.java:716)
at org.apache.dubbo.common.extension.ExtensionLoader.<init>(ExtensionLoader.java:196)
at org.apache.dubbo.common.extension.ExtensionDirector.createExtensionLoader0(ExtensionDirector.java:123)
at org.apache.dubbo.common.extension.ExtensionDirector.createExtensionLoader(ExtensionDirector.java:114)
at org.apache.dubbo.common.extension.ExtensionDirector.getExtensionLoader(ExtensionDirector.java:104)
at org.apache.dubbo.common.extension.ExtensionAccessor.getExtensionLoader(ExtensionAccessor.java:27)
at org.apache.dubbo.metadata.definition.TypeDefinitionBuilder.initBuilders(TypeDefinitionBuilder.java:43)
at org.apache.dubbo.rpc.model.FrameworkModel.initialize(FrameworkModel.java:86)
at org.apache.dubbo.rpc.model.FrameworkModel.<init>(FrameworkModel.java:79)
at org.apache.dubbo.rpc.model.FrameworkModel.defaultModel(FrameworkModel.java:172)
at org.apache.dubbo.rpc.model.ApplicationModel.defaultModel(ApplicationModel.java:92)
at org.apache.dubbo.config.AbstractMethodConfig.<init>(AbstractMethodConfig.java:103)
at org.apache.dubbo.config.AbstractInterfaceConfig.<init>(AbstractInterfaceConfig.java:200)
at org.apache.dubbo.config.AbstractServiceConfig.<init>(AbstractServiceConfig.java:132)
at org.apache.dubbo.config.ServiceConfigBase.<init>(ServiceConfigBase.java:84)
at org.apache.dubbo.config.ServiceConfig.<init>(ServiceConfig.java:136)
at org.apache.dubbo.demo.graalvm.provider.Application.startWithBootstrap(Application.java:50)
at org.apache.dubbo.demo.graalvm.provider.Application.main(Application.java:40)
Caused by: java.lang.IllegalStateException: Can't create adaptive extension interface org.apache.dubbo.common.extension.ExtensionInjector, cause: No adaptive method exist on extension org.apache.dubbo.common.extension.ExtensionInjector, refuse to create the adaptive class!
at org.apache.dubbo.common.extension.ExtensionLoader.createAdaptiveExtension(ExtensionLoader.java:1291)
at org.apache.dubbo.common.extension.ExtensionLoader.getAdaptiveExtension(ExtensionLoader.java:712)
... 17 more
Caused by: java.lang.IllegalStateException: No adaptive method exist on extension org.apache.dubbo.common.extension.ExtensionInjector, refuse to create the adaptive class!
at org.apache.dubbo.common.extension.AdaptiveClassCodeGenerator.generate(AdaptiveClassCodeGenerator.java:104)
at org.apache.dubbo.common.extension.AdaptiveClassCodeGenerator.generate(AdaptiveClassCodeGenerator.java:94)
at org.apache.dubbo.common.extension.ExtensionLoader.createAdaptiveExtensionClass(ExtensionLoader.java:1313)
at org.apache.dubbo.common.extension.ExtensionLoader.getAdaptiveExtensionClass(ExtensionLoader.java:1300)
at org.apache.dubbo.common.extension.ExtensionLoader.createAdaptiveExtension(ExtensionLoader.java:1284)
... 18 more
5条答案
按热度按时间xzv2uavs1#
https://dubbo.apache.org/zh/docs3-building/java-sdk/reference-manual/graalvm/
iibxawm42#
Hi @AlbumenJ
I read this instruction.
The generated java classes are present in dubbo-demo-native-provider project:
zte4gxcn3#
@AlbumenJ
Which version of graalvm is compatible with dubbo 3.0?
hl0ma9xz4#
@eratolekov Graalvm is an experimental feature in 3.x version that is still under development. Would you like to join and build this feature together with the community?
hsgswve45#
hi @chickenlj
definitely I'd like to join, but I guess my experience in graalvm and dubbo is not quite so deep.
anyway I'm interested in dubbo 3 + graalvm