Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] The application built using native image failed to start.I need to manually modify reflect-config. json of application.dubbo version: 3.3.0-beta.2 #14147

Open
3 of 4 tasks
imgoby opened this issue Apr 30, 2024 · 0 comments
Assignees
Labels
component/need-triage Need maintainers to triage type/need-triage Need maintainers to triage

Comments

@imgoby
Copy link

imgoby commented Apr 30, 2024

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

3.3.0-beta.2

Steps to reproduce this issue

  1. check out the sub project source: https://github.com/imgoby/spring-cloud-alibaba-dubbo-native
  2. mvn clean package native:compile
  3. enter sub project: cd dubbo-samples-native-image-registry-provider
  4. cd target
  5. run: ./dubbo-spring-boot-zookeeper-provider

What you expected to happen

Run without Exception.

Anything else

2024-04-30T15:52:25.550+08:00  INFO 31307 --- [           main] .DubboRegistryZooKeeperProviderBootstrap : Starting AOT-processed DubboRegistryZooKeeperProviderBootstrap using Java 17.0.11 with PID 31307 (/root/spring-cloud-alibaba-dubbo-native/dubbo-spring-boot-zookeeper-provider/target/dubbo-spring-boot-zookeeper-provider started by root in /root/spring-cloud-alibaba-dubbo-native/dubbo-spring-boot-zookeeper-provider/target)
2024-04-30T15:52:25.550+08:00  INFO 31307 --- [           main] .DubboRegistryZooKeeperProviderBootstrap : No active profile set, falling back to 1 default profile: "default"
2024-04-30T15:52:25.552+08:00  WARN 31307 --- [           main] w.s.c.ServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serviceAnnotationBeanProcessor': Instantiation of supplied bean failed
2024-04-30T15:52:25.552+08:00 ERROR 31307 --- [           main] o.s.boot.SpringApplication               : Application run failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serviceAnnotationBeanProcessor': Instantiation of supplied bean failed
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainFromSupplier(AbstractAutowireCapableBeanFactory.java:1220) ~[dubbo-spring-boot-zookeeper-provider:6.0.11]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1158) ~[dubbo-spring-boot-zookeeper-provider:6.0.11]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:560) ~[dubbo-spring-boot-zookeeper-provider:6.0.11]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:520) ~[dubbo-spring-boot-zookeeper-provider:6.0.11]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) ~[dubbo-spring-boot-zookeeper-provider:6.0.11]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[dubbo-spring-boot-zookeeper-provider:6.0.11]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) ~[dubbo-spring-boot-zookeeper-provider:6.0.11]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:205) ~[dubbo-spring-boot-zookeeper-provider:6.0.11]
	at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:138) ~[na:na]
	at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:771) ~[dubbo-spring-boot-zookeeper-provider:6.0.11]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:589) ~[dubbo-spring-boot-zookeeper-provider:6.0.11]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[dubbo-spring-boot-zookeeper-provider:3.0.9]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:732) ~[dubbo-spring-boot-zookeeper-provider:3.0.9]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:434) ~[dubbo-spring-boot-zookeeper-provider:3.0.9]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:310) ~[dubbo-spring-boot-zookeeper-provider:3.0.9]
	at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:150) ~[na:na]
	at org.apache.dubbo.spring.boot.sample.provider.bootstrap.DubboRegistryZooKeeperProviderBootstrap.main(DubboRegistryZooKeeperProviderBootstrap.java:34) ~[dubbo-spring-boot-zookeeper-provider:na]
Caused by: java.lang.RuntimeException: java.lang.NoSuchMethodException: org.apache.dubbo.config.spring6.beans.factory.annotation.ServiceAnnotationWithAotPostProcessor.<init>(java.util.Collection)
	at org.apache.dubbo.spring.boot.autoconfigure.DubboAutoConfiguration.serviceAnnotationBeanProcessor(DubboAutoConfiguration.java:74) ~[dubbo-spring-boot-zookeeper-provider:na]
	at org.apache.dubbo.spring.boot.autoconfigure.DubboAutoConfiguration__BeanDefinitions.lambda$getServiceAnnotationBeanProcessorInstanceSupplier$0(DubboAutoConfiguration__BeanDefinitions.java:31) ~[na:na]
	at org.springframework.util.function.ThrowingBiFunction.apply(ThrowingBiFunction.java:68) ~[dubbo-spring-boot-zookeeper-provider:6.0.11]
	at org.springframework.util.function.ThrowingBiFunction.apply(ThrowingBiFunction.java:54) ~[dubbo-spring-boot-zookeeper-provider:6.0.11]
	at org.springframework.beans.factory.aot.BeanInstanceSupplier.lambda$get$2(BeanInstanceSupplier.java:202) ~[na:na]
	at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:58) ~[dubbo-spring-boot-zookeeper-provider:6.0.11]
	at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:46) ~[dubbo-spring-boot-zookeeper-provider:6.0.11]
	at org.springframework.beans.factory.aot.BeanInstanceSupplier.invokeBeanSupplier(BeanInstanceSupplier.java:214) ~[na:na]
	at org.springframework.beans.factory.aot.BeanInstanceSupplier.get(BeanInstanceSupplier.java:202) ~[na:na]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.obtainInstanceFromSupplier(DefaultListableBeanFactory.java:947) ~[dubbo-spring-boot-zookeeper-provider:6.0.11]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainFromSupplier(AbstractAutowireCapableBeanFactory.java:1214) ~[dubbo-spring-boot-zookeeper-provider:6.0.11]
	... 16 common frames omitted
Caused by: java.lang.NoSuchMethodException: org.apache.dubbo.config.spring6.beans.factory.annotation.ServiceAnnotationWithAotPostProcessor.<init>(java.util.Collection)
	at [email protected]/java.lang.Class.checkMethod(DynamicHub.java:1042) ~[dubbo-spring-boot-zookeeper-provider:na]
	at [email protected]/java.lang.Class.getConstructor0(DynamicHub.java:1208) ~[dubbo-spring-boot-zookeeper-provider:na]
	at [email protected]/java.lang.Class.getDeclaredConstructor(DynamicHub.java:2754) ~[dubbo-spring-boot-zookeeper-provider:na]
	at org.apache.dubbo.spring.boot.autoconfigure.DubboAutoConfiguration.serviceAnnotationBeanProcessor(DubboAutoConfiguration.java:71) ~[dubbo-spring-boot-zookeeper-provider:na]
	... 26 common frames omitted

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

@imgoby imgoby added component/need-triage Need maintainers to triage type/need-triage Need maintainers to triage labels Apr 30, 2024
@imgoby imgoby changed the title [Bug] version [Bug] The application built using native image failed to start,dubbo version: 3.3.0-beta.2 Apr 30, 2024
@imgoby imgoby changed the title [Bug] The application built using native image failed to start,dubbo version: 3.3.0-beta.2 [Bug] The application built using native image failed to start.I need to manually modify reflect config. json.dubbo version: 3.3.0-beta.2 Apr 30, 2024
@imgoby imgoby changed the title [Bug] The application built using native image failed to start.I need to manually modify reflect config. json.dubbo version: 3.3.0-beta.2 [Bug] The application built using native image failed to start.I need to manually modify reflect-config. json of application.dubbo version: 3.3.0-beta.2 Apr 30, 2024
@CrazyHZM CrazyHZM self-assigned this May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/need-triage Need maintainers to triage type/need-triage Need maintainers to triage
Projects
Status: Todo
Development

No branches or pull requests

2 participants