Error creating bean with name 'org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$EnableWebMvcConfiguration when starting spring boot on Wildfly 11,12,13. [SPR-16990]
See original GitHub issueGiuseppe M Pereira opened SPR-16990 and commented
Bug report
// "WFLYCTL0080: Failed services" => {"jboss.undertow.deployment.default-server.default-host.\"/dynamo-application-0.0.1-SNAPSHOT\"" => "java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$EnableWebMvcConfiguration': Injection of autowired dependencies failed; nested exception is org.springframework.aop.framework.AopConfigException: Unexpected AOP exception; nested exception is org.springframework.aop.framework.AopConfigException: Unable to instantiate proxy using Objenesis, and regular proxy instantiation via default constructor fails as well; nested exception is java.lang.InstantiationException: org.springframework.boot.autoconfigure.web.HttpMessageConverters$$EnhancerBySpringCGLIB$$3ba87c15
Caused by: java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$EnableWebMvcConfiguration': Injection of autowired dependencies failed; nested exception is org.springframework.aop.framework.AopConfigException: Unexpected AOP exception; nested exception is org.springframework.aop.framework.AopConfigException: Unable to instantiate proxy using Objenesis, and regular proxy instantiation via default constructor fails as well; nested exception is java.lang.InstantiationException: org.springframework.boot.autoconfigure.web.HttpMessageConverters$$EnhancerBySpringCGLIB$$3ba87c15
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$EnableWebMvcConfiguration': Injection of autowired dependencies failed; nested exception is org.springframework.aop.framework.AopConfigException: Unexpected AOP exception; nested exception is org.springframework.aop.framework.AopConfigException: Unable to instantiate proxy using Objenesis, and regular proxy instantiation via default constructor fails as well; nested exception is java.lang.InstantiationException: org.springframework.boot.autoconfigure.web.HttpMessageConverters$$EnhancerBySpringCGLIB$$3ba87c15
Caused by: org.springframework.aop.framework.AopConfigException: Unexpected AOP exception; nested exception is org.springframework.aop.framework.AopConfigException: Unable to instantiate proxy using Objenesis, and regular proxy instantiation via default constructor fails as well; nested exception is java.lang.InstantiationException: org.springframework.boot.autoconfigure.web.HttpMessageConverters$$EnhancerBySpringCGLIB$$3ba87c15
Caused by: org.springframework.aop.framework.AopConfigException: Unable to instantiate proxy using Objenesis, and regular proxy instantiation via default constructor fails as well; nested exception is java.lang.InstantiationException: org.springframework.boot.autoconfigure.web.HttpMessageConverters$$EnhancerBySpringCGLIB$$3ba87c15
Caused by: java.lang.InstantiationException: org.springframework.boot.autoconfigure.web.HttpMessageConverters$$EnhancerBySpringCGLIB$$3ba87c15
Caused by: java.lang.NoSuchMethodException: org.springframework.boot.autoconfigure.web.HttpMessageConverters$$EnhancerBySpringCGLIB$$3ba87c15.<init>()"},
Getting following exception when loading spring boot war on wildfly 13. However, it works if I start my project with maven from the console with mvn spring-boot:run as jar build.
Affects: 5.0.7
Referenced from: commits https://github.com/spring-projects/spring-boot/commit/58e886fddf8a1077efedcb99c8038b6e7aaf55b8
Issue Analytics
- State:
- Created 5 years ago
- Comments:6
Top Results From Across the Web
Error creating bean with name 'org.springframework.boot ...
This following code upgraded my springboot from 2.7.5 to springboot 3.0.0-M4. After recompiling with maven, i'm successfully able to access ...
Read more >Spring Boot Error - Error creating a bean with name ...
Spring Boot Error - Error creating a bean with name 'dataSource' defined in class path resource ... DataSource org.springframework.boot.autoconfigure.jdbc.
Read more >Resolving Failed to Configure a DataSource Error - Baeldung
In this short tutorial, we'll discuss what causes and what resolves the “Failed to configure a DataSource” error on a Spring Boot project....
Read more >How to install a Spring module in JBoss EAP
Download the desired version of Spring. For this example we are using Spring 3.1.1. Create the directory $JBOSS_HOME/modules/org/springframework ...
Read more >Spring Boot 2.6.3 is now available
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'configurationPropertiesBeans' defined in class path ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Brian Clozel commented
Juergen Hoeller and I have been looking at this - it seems WildFly (actually, JBoss Modules) is not exposing
sun.reflect
norjdk.internal
packages with JDK9+.Launching a Spring Boot application with Spring MVC support fails because of the following:
I’ve opened MODULES-373 to find out more about this - the JBoss Modules team answered that developers need to declare the
jdk.unsupported
module as a Dependency (see reference documentation).I managed to run a Spring Boot application by updating my project build:
In addition to that, the Spring Boot team is working on relaxing the reflection arrangement to avoid this advanced use case triggered by the Spring Boot infrastructure - but this does not guarantee that this case cannot be triggered by the application itself, so declaring that dependency is still advised.
I’m closing this issue, as this a configuration issue that WildFly users need to take into account.
Stefano Paganucci commented
Thank you so much Juergen Hoeller for the explanation!