Error creating bean with name defaultValidator defined in class path resource

Tomcat deployment war package appears:

There are a lot of errors such as error creating bean with name'defaultvalidator' defined in class path resource , but after checking the code, there is no problem.

In fact, this is because the version of tomcat integrated with the springboot package you quoted is not high enough, which leads to deployment errors. This has nothing to do with the tomcat you configure yourself. It is a problem with the integrated tomcat version that comes with springboot. The springboot package downloaded from the Internet is normal. I later learned that the springboot of the company nexus was only integrated to the highest tomcat8.5, but the springboot 2.1.8.RELEASE I used, when deployed, requires tomcat9 to integrate the deployment, so an error was reported. No way, I changed the version of springboot to 2.1.0.RELEASE, and can use tomcat8.5 to deploy when deploying, just fine.

  1. Home
  2. Spring
  3. Error Creating Bean With Name 39defaultvalidator39 Defined In Class Path Resource

Error creating bean with name defaultValidator defined in class path resource
Error creating bean with name defaultValidator defined in class path resource
Error creating bean with name defaultValidator defined in class path resource
Error creating bean with name defaultValidator defined in class path resource
Error creating bean with name defaultValidator defined in class path resource
Error creating bean with name defaultValidator defined in class path resource
Error creating bean with name defaultValidator defined in class path resource
Error creating bean with name defaultValidator defined in class path resource

Error creating bean with name 'defaultValidator' defined in class path resource

Tags: spring , spring-boot , jboss Answers: | Viewed 24,812 times

I am getting the following Error while trying to deploy my spring boot application on JBOSS. It works well on embedded Tomcat Server though. I tried to browse through Stack overflow to find similar issues. Could not find a solution yet. Any suggestions would be appreciated. Thanks.


Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
00:36:34,356 ERROR [org.springframework.boot.SpringApplication] (ServerService Thread Pool -- 56) Application run failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultValidator' defined in class path resource [org/springframework/boot/autoconfigure/validation/ValidationAutoConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: javax.validation.Configuration.getDefaultParameterNameProvider()Ljavax/validation/ParameterNameProvider;
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1699) [spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:573) [spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495) [spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) [spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$$Lambda$123/1614986064.getObject(Unknown Source)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) [spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) [spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) [spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:759) [spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:869) [spring-context-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) [spring-context-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:762) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:398) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:330) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:157) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:137) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:91) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:172) [spring-web-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.jboss.as.web.deployment.JBossContextConfig.lifecycleEvent(JBossContextConfig.java:187) [jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:115) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3775) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:163) [jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:61) [jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:96) [jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [rt.jar:1.8.0_31]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_31]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_31]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_31]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_31]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: java.lang.NoSuchMethodError: javax.validation.Configuration.getDefaultParameterNameProvider()Ljavax/validation/ParameterNameProvider;
at org.springframework.validation.beanvalidation.LocalValidatorFactoryBean.configureParameterNameProvider(LocalValidatorFactoryBean.java:314) [spring-context-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.validation.beanvalidation.LocalValidatorFactoryBean.afterPropertiesSet(LocalValidatorFactoryBean.java:290) [spring-context-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1758) [spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1695) [spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
... 30 more


Some Code Answers


Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 00:36:34,356 ERROR [org.springframework.boot.SpringApplication] (ServerService Thread Pool -- 56) Application run failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultValidator' defined in class path resource [org/springframework/boot/autoconfigure/validation/ValidationAutoConfiguration.class]: Invocation of init method failed;
nested exception is java.lang.NoSuchMethodError: javax.validation.Configuration.getDefaultParameterNameProvider()Ljavax/validation/ParameterNameProvider;
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1699) [spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:573) [spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495) [spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) [spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$$Lambda$123/1614986064.getObject(Unknown Source)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) [spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) [spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) [spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:759) [spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:869) [spring-context-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) [spring-context-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:762) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:398) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:330) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:157) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:137) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:91) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:172) [spring-web-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.jboss.as.web.deployment.JBossContextConfig.lifecycleEvent(JBossContextConfig.java:187) [jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:115) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3775) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:163) [jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:61) [jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:96) [jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [rt.jar:1.8.0_31]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_31]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_31]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_31]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_31]
at org.jboss.threads.JBossThread.run(JBossThread.java:122) Caused by: java.lang.NoSuchMethodError: javax.validation.Configuration.getDefaultParameterNameProvider()Ljavax/validation/ParameterNameProvider;
at org.springframework.validation.beanvalidation.LocalValidatorFactoryBean.configureParameterNameProvider(LocalValidatorFactoryBean.java:314) [spring-context-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.validation.beanvalidation.LocalValidatorFactoryBean.afterPropertiesSet(LocalValidatorFactoryBean.java:290) [spring-context-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1758) [spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1695) [spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
... 30 more

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>


<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>


module mymodule {
requires spring.boot;
requires spring.boot.autoconfigure;
requires spring.core;
requires spring.web;
requires com.fasterxml.classmate;
exports mymodule;
opens mymodule;
}


<!-- https://mvnrepository.com/artifact/javax.validation/validation-api -->
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>2.0.1.Final</version>
</dependency>


java - Spring Boot - Error creating bean with name …

1 week ago Jan 20, 2015  · The hibernate.* properties are useless, they should be spring.jpa.* properties. Not to mention that you are trying to override those already set by using the spring.jpa.* properties. (For the explanation of each property I strongly suggest a read of the Spring Boot reference guide.. spring.jpa.database-platform = org.hibernate.dialect.MySQL5Dialect …

Reviews: 6

Show details

See also: Java Spring Database Hibernate

Error creating bean with name 'mongoTemplate' defined …

2 days ago The stacktrace is pretty straight forward, it seems the mongo client bean is not getting created which in turn is not creating the mongo template bean because the code cannot find an appropriate constructor for mongo client with the number of parameters you have provided.

Reviews: 6

Show details

java - BeanCreationException: Error creating bean with …

2 days ago Sep 05, 2021  · Teams. Q&A for work. Connect and share knowledge within a single location that is structured and easy to search. Learn more

Show details

See also: Java

Error while creating bean with name 'dataSource' defined …

5 days ago Apr 01, 2021  · Normally, you dont define a JNDI datasource inside your application, but in your application container.Spring uses an embedded Tomcat Server though, where JNDI is disabled by default.. The easiest way would be to use an external Application Server and modifying its configuration by adding a JNDI configuration. With embedded tomcat, datasource …

Show details

Error creating bean with name 'entityManagerFactory' …

3 days ago I suspect that the jar files of hibernate-core and hibernate-entitymanager dependencies are corrupted or were not installed properly on your machine.. I suggest that you just delete the folders named hibernate-core and hibernate-entitymanager from your Maven local repository and Maven will reinstall them.. The default location for Maven local repository is C:\Documents …

Show details

See also: Hibernate File

Spring Boot – Error creating bean with name ‘dataSource’ defined …

1 week ago @RestController public class ParserController { @Autowired private ParserService parserService; @Autowired private RecordDao recordDao; private static final Logger LOG = Logger.getLogger(ParserController.class); @RequestMapping(value="/upload", method= RequestMethod.POST) public @ResponseBody String fileUploadPage( } }

Show details

See also: File Class

[Solved] Error creating bean with name ‘entityManagerFactory’ …

1 week ago Jun 25, 2021  · The project integrates spring boot and spring data JPA, then simply configures spring data JPA and spring boot, and starts to refactor the company’s project.

Show details

See also: Spring

Spring Boot Error: Creating a Bean With 'DataSource' Defined in

1 week ago Apr 17, 2019  · Check out this post on the Spring Boot error that occurs when creating a 'dataSource' bean defined in the class path resource DataSourceAutoConfiguration.

Show details

See also: Class

Error creating bean with name transactionManager defined in …

4 days ago 标签: 异常错误Error creating bean with name transactionManager defined in class path resource [spring-dao.xml]: Invocation of init ...

Show details

See also: Xml Spring Class

Error creating bean with name amazonsns defined in class path …

1 week ago Red Hat JBoss Fuse 6.3 Apache Camel Component Reference Configuration reference for Camel components JBoss A-MQ Docs Team Red Hat JBoss Fuse 6.3 Apache Camel Component Reference.

Show details

See also: Class

Error creating bean with name amazonsns defined in class path …

6 days ago invisible folder name; ocr a level english literature exemplar hamlet; unsw ipt atak mil javascript read csv file from path. golang sql scan multiple rows lg heaters; kpop idol name start with e; cal water; tubing in michigan near me; function of process control block; setting keyboard lenovo; motorcycle headphones; doordash core competencies ...

Show details

See also: Javascript Java Sql Function Csv File Class

Error creating bean with name 'liquibase' defined in class path ...

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

Show details

See also: Class

Error creating bean with name 'dataSource' defined in class path resource

4 days ago Nov 09, 2021  · Level up your programming skills with exercises across 52 languages, and insightful discussion with our dedicated team of welcoming mentors.

Show details

See also: Class

Please leave your answer here: