TeslaCN commented on issue #5088:
URL: https://github.com/apache/shenyu/issues/5088#issuecomment-1702463580

   I tried building a native image for Shenyu Admin (current Spring Boot 
version is 2.7.13), but the binary failed to start.
   So bumping Spring Boot to 3.x may be necessary.
   
   ```
   > ./shenyu-admin-dist 
   
     .   ____          _            __ _ _
    /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
   ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
    \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
     '  |____| .__|_| |_|_| |_\__, | / / / /
    =========|_|==============|___/=/_/_/_/
    :: Spring Boot ::               (v2.7.13)
   
   17:10:40.408 [main] INFO org.springframework.boot.SpringApplication - 
Starting application using Java 17.0.8 on wuweijie-ubuntu with PID 347687 
(started by wuweijie in 
/home/wuweijie/projects/shenyu/shenyu-dist/shenyu-admin-dist/target)
   17:10:40.408 [main] DEBUG org.springframework.boot.SpringApplication - 
Running with Spring Boot v2.7.13, Spring v5.3.28
   17:10:40.408 [main] INFO org.springframework.boot.SpringApplication - No 
active profile set, falling back to 1 default profile: "default"
   17:10:40.408 [main] DEBUG org.springframework.boot.SpringApplication - 
Loading source class org.apache.shenyu.admin.ShenyuAdminBootstrap
   17:10:40.408 [main] DEBUG 
org.springframework.context.annotation.AnnotationConfigApplicationContext - 
Refreshing 
org.springframework.context.annotation.AnnotationConfigApplicationContext@1ca03575
   17:10:40.408 [main] DEBUG 
org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating 
shared instance of singleton bean 
'org.springframework.context.annotation.internalConfigurationAnnotationProcessor'
   17:10:40.408 [main] WARN 
org.springframework.context.annotation.AnnotationConfigApplicationContext - 
Exception encountered during context initialization - cancelling refresh 
attempt: org.springframework.beans.factory.BeanCreationException: Error 
creating bean with name 
'org.springframework.context.annotation.internalConfigurationAnnotationProcessor':
 Instantiation of bean failed; nested exception is 
org.springframework.beans.BeanInstantiationException: Failed to instantiate 
[org.springframework.context.annotation.ConfigurationClassPostProcessor]: No 
default constructor found; nested exception is java.lang.NoSuchMethodException: 
org.springframework.context.annotation.ConfigurationClassPostProcessor.<init>()
   17:10:40.408 [main] ERROR org.springframework.boot.SpringApplication - 
Application run failed
   org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 
'org.springframework.context.annotation.internalConfigurationAnnotationProcessor':
 Instantiation of bean failed; nested exception is 
org.springframework.beans.BeanInstantiationException: Failed to instantiate 
[org.springframework.context.annotation.ConfigurationClassPostProcessor]: No 
default constructor found; nested exception is java.lang.NoSuchMethodException: 
org.springframework.context.annotation.ConfigurationClassPostProcessor.<init>()
           at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1334)
           at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1232)
           at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
           at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
           at 
org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
           at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
           at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
           at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:213)
           at 
org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:106)
           at 
org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:748)
           at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:564)
           at 
org.springframework.boot.SpringApplication.refresh(SpringApplication.java:731)
           at 
org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408)
           at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:307)
           at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:1303)
           at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:1292)
           at 
org.apache.shenyu.admin.ShenyuAdminBootstrap.main(ShenyuAdminBootstrap.java:36)
   Caused by: org.springframework.beans.BeanInstantiationException: Failed to 
instantiate 
[org.springframework.context.annotation.ConfigurationClassPostProcessor]: No 
default constructor found; nested exception is java.lang.NoSuchMethodException: 
org.springframework.context.annotation.ConfigurationClassPostProcessor.<init>()
           at 
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:83)
           at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1326)
           ... 16 common frames omitted
   Caused by: java.lang.NoSuchMethodException: 
org.springframework.context.annotation.ConfigurationClassPostProcessor.<init>()
           at [email protected]/java.lang.Class.checkMethod(DynamicHub.java:1038)
           at 
[email protected]/java.lang.Class.getConstructor0(DynamicHub.java:1204)
           at 
[email protected]/java.lang.Class.getDeclaredConstructor(DynamicHub.java:2754)
           at 
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:78)
           ... 17 common frames omitted
   ```
   
   
![image](https://github.com/apache/shenyu/assets/20503072/509c0d9b-2163-4d7d-98b0-e00336961ed3)
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to