Closed imgoby closed 10 months ago
step is :
@CrazyHZM Do you know why?
@imgoby
Failed to generate proxy by Javassist failed. Fallback to use JDK proxy success. Interfaces
This error should not affect you. We will consider how to avoid this error message.
please assign to me
@CrazyHZM I found that ReferenceAnnotationBeanPostProcessor
will not work in native scenario, because AotWithSpringDetector.useGeneratedArtifacts() = true
, the processor is not registered
finally ReferenceConfig.url
is not set correctly, and get the error, I'm not sure how to fix it
ERROR [dubbo-samples-nativeimage-consumer,,] 17013 --- [ main] o.a.d.c.deploy.DefaultModuleDeployer : [DUBBO] Model reference failed: Dubbo Module[1.1.1] , catch error : No such any registry to reference org.apache.dubbo.nativeimage.DemoService on the consumer 10.253.77.49 use dubbo version 3.3.0-beta.2-SNAPSHOT, please config <dubbo:registry address="..." /> to your spring config., dubbo version: 3.3.0-beta.2-SNAPSHOT, current host: 10.253.77.49, error code: 5-15. This may be caused by , go to https://dubbo.apache.org/faq/5/15 to find instructions.
java.lang.IllegalStateException: No such any registry to reference org.apache.dubbo.nativeimage.DemoService on the consumer 10.253.77.49 use dubbo version 3.3.0-beta.2-SNAPSHOT, please config <dubbo:registry address="..." /> to your spring config.
at org.apache.dubbo.config.ReferenceConfig.aggregateUrlFromRegistry(ReferenceConfig.java:647) ~[dubbo-samples-native-image-consumer:3.3.0-beta.2-SNAPSHOT]
at org.apache.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:487) ~[dubbo-samples-native-image-consumer:3.3.0-beta.2-SNAPSHOT]
at org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:372) ~[dubbo-samples-native-image-consumer:3.3.0-beta.2-SNAPSHOT]
at org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:241) ~[dubbo-samples-native-image-consumer:3.3.0-beta.2-SNAPSHOT]
at org.apache.dubbo.config.utils.SimpleReferenceCache.get(SimpleReferenceCache.java:140) ~[na:na]
at org.apache.dubbo.config.deploy.DefaultModuleDeployer.lambda$referServices$6(DefaultModuleDeployer.java:564) ~[dubbo-samples-native-image-consumer:3.3.0-beta.2-SNAPSHOT]
at java.base@17.0.6/java.util.concurrent.ConcurrentHashMap$ValuesView.forEach(ConcurrentHashMap.java:4780) ~[na:na]
at org.apache.dubbo.config.deploy.DefaultModuleDeployer.referServices(DefaultModuleDeployer.java:536) ~[dubbo-samples-native-image-consumer:3.3.0-beta.2-SNAPSHOT]
at org.apache.dubbo.config.deploy.DefaultModuleDeployer.startSync(DefaultModuleDeployer.java:186) ~[dubbo-samples-native-image-consumer:3.3.0-beta.2-SNAPSHOT]
at org.apache.dubbo.config.deploy.DefaultModuleDeployer.start(DefaultModuleDeployer.java:159) ~[dubbo-samples-native-image-consumer:3.3.0-beta.2-SNAPSHOT]
at org.apache.dubbo.config.spring.context.DubboDeployApplicationListener.onContextRefreshedEvent(DubboDeployApplicationListener.java:167) ~[dubbo-samples-native-image-consumer:na]
at org.apache.dubbo.config.spring.context.DubboDeployApplicationListener.onApplicationEvent(DubboDeployApplicationListener.java:153) ~[dubbo-samples-native-image-consumer:na]
at org.apache.dubbo.config.spring.context.DubboDeployApplicationListener.onApplicationEvent(DubboDeployApplicationListener.java:52) ~[dubbo-samples-native-image-consumer:na]
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176) ~[na:na]
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169) ~[na:na]
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143) ~[na:na]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:413) ~[dubbo-samples-native-image-consumer:6.0.7]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:370) ~[dubbo-samples-native-image-consumer:6.0.7]
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:937) ~[dubbo-samples-native-image-consumer:6.0.7]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:587) ~[dubbo-samples-native-image-consumer:6.0.7]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:732) ~[dubbo-samples-native-image-consumer:3.0.5]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:434) ~[dubbo-samples-native-image-consumer:3.0.5]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:310) ~[dubbo-samples-native-image-consumer:3.0.5]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1304) ~[dubbo-samples-native-image-consumer:3.0.5]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1293) ~[dubbo-samples-native-image-consumer:3.0.5]
at org.apache.dubbo.nativeimage.consumer.NativeDemoConsumerApplication.main(NativeDemoConsumerApplication.java:38) ~[dubbo-samples-native-image-consumer:na]
@FoghostCn ReferenceAnnotationBeanPostProcessor will be replaced with ReferenceAnnotationWithAotBeanPostProcessor in the native scenario.
@FoghostCn
ReferenceAnnotationBeanPostProcessor will be replaced with ReferenceAnnotationWithAotBeanPostProcessor in the native scenario.
Yes but ReferenceAnnotationWithAotBeanPostProcessor
is not register too
if (!AotWithSpringDetector.useGeneratedArtifacts()) { // false in native scenario
DubboBeanUtils.registerCommonBeans(registry); // not reachable, AotBeanPostProcessor is register here
}
This is because BeanDefinition does not pass attributes by default in native. It will be fixed in the next version.
The Exception looks like this: