imgoby opened a new issue, #1007:
URL: https://github.com/apache/dubbo-samples/issues/1007

   dubbo-samples-native-image runs failed.
   
   how to resolve it?
   
   
   `
   
   2023-10-20T15:52:49.381+08:00 ERROR [dubbo-samples-nativeimage-provider,,] 
16112 --- [           main] o.s.boot.SpringApplication               : 
Application run failed
   
   org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'ServiceBean:org.apache.dubbo.nativeimage.DemoService::': 
Instantiation of supplied bean failed
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainFromSupplier(AbstractAutowireCapableBeanFactory.java:1220)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1158)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:560)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:520)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326)
        at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)
        at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:973)
        at 
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:942)
        at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:608)
        at 
org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146)
        at 
org.springframework.boot.SpringApplication.refresh(SpringApplication.java:732)
        at 
org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:434)
        at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:310)
        at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:1304)
        at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:1293)
        at 
org.apache.dubbo.nativeimage.provider.NativeDemoProviderApplication.main(NativeDemoProviderApplication.java:33)
   Caused by: java.lang.IllegalStateException: Failed to create adaptive 
instance: java.lang.IllegalStateException: Can't create adaptive extension 
interface org.apache.dubbo.rpc.Protocol, cause: No adaptive method exist on 
extension org.apache.dubbo.rpc.Protocol, refuse to create the adaptive class!
        at 
org.apache.dubbo.common.extension.ExtensionLoader.getAdaptiveExtension(ExtensionLoader.java:750)
        at 
org.apache.dubbo.config.ServiceConfig.postProcessAfterScopeModelChanged(ServiceConfig.java:181)
        at 
org.apache.dubbo.config.AbstractConfig.setScopeModel(AbstractConfig.java:428)
        at 
org.apache.dubbo.config.AbstractConfig.<init>(AbstractConfig.java:129)
        at 
org.apache.dubbo.config.AbstractMethodConfig.<init>(AbstractMethodConfig.java:110)
        at 
org.apache.dubbo.config.AbstractInterfaceConfig.<init>(AbstractInterfaceConfig.java:207)
        at 
org.apache.dubbo.config.AbstractServiceConfig.<init>(AbstractServiceConfig.java:162)
        at 
org.apache.dubbo.config.ServiceConfigBase.<init>(ServiceConfigBase.java:92)
        at org.apache.dubbo.config.ServiceConfig.<init>(ServiceConfig.java:167)
        at 
org.apache.dubbo.config.spring.ServiceBean.<init>(ServiceBean.java:58)
        at 
org.apache.dubbo.config.spring.ServiceBean__BeanDefinitions.lambda$getDemoServiceInstanceSupplier$0(ServiceBean__BeanDefinitions.java:20)
        at 
org.springframework.util.function.ThrowingBiFunction.apply(ThrowingBiFunction.java:68)
        at 
org.springframework.util.function.ThrowingBiFunction.apply(ThrowingBiFunction.java:54)
        at 
org.springframework.beans.factory.aot.BeanInstanceSupplier.lambda$get$2(BeanInstanceSupplier.java:202)
        at 
org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:58)
        at 
org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:46)
        at 
org.springframework.beans.factory.aot.BeanInstanceSupplier.invokeBeanSupplier(BeanInstanceSupplier.java:210)
        at 
org.springframework.beans.factory.aot.BeanInstanceSupplier.get(BeanInstanceSupplier.java:202)
        at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.obtainInstanceFromSupplier(DefaultListableBeanFactory.java:947)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainFromSupplier(AbstractAutowireCapableBeanFactory.java:1214)
        ... 17 common frames omitted
   Caused by: java.lang.IllegalStateException: Can't create adaptive extension 
interface org.apache.dubbo.rpc.Protocol, cause: No adaptive method exist on 
extension org.apache.dubbo.rpc.Protocol, refuse to create the adaptive class!
        at 
org.apache.dubbo.common.extension.ExtensionLoader.createAdaptiveExtension(ExtensionLoader.java:1399)
        at 
org.apache.dubbo.common.extension.ExtensionLoader.getAdaptiveExtension(ExtensionLoader.java:745)
        ... 36 common frames omitted
   Caused by: java.lang.IllegalStateException: No adaptive method exist on 
extension org.apache.dubbo.rpc.Protocol, refuse to create the adaptive class!
        at 
org.apache.dubbo.common.extension.AdaptiveClassCodeGenerator.generate(AdaptiveClassCodeGenerator.java:105)
        at 
org.apache.dubbo.common.extension.AdaptiveClassCodeGenerator.generate(AdaptiveClassCodeGenerator.java:95)
        at 
org.apache.dubbo.common.extension.ExtensionLoader.createAdaptiveExtensionClass(ExtensionLoader.java:1421)
        at 
org.apache.dubbo.common.extension.ExtensionLoader.getAdaptiveExtensionClass(ExtensionLoader.java:1408)
        at 
org.apache.dubbo.common.extension.ExtensionLoader.createAdaptiveExtension(ExtensionLoader.java:1391)
        ... 37 common frames omitted`
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org
For additional commands, e-mail: notifications-h...@dubbo.apache.org

Reply via email to