①在springboot的spring-boot-starter-web默认引入了以下依赖:

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.8.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.8.7</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.8.7</version>
</dependency>

在spring-boot-starter-web的这个依赖包里集成了所有的springframework的包比如spring-bean,tx,core等所就不需要引入springframework的包了。要不然由于版本号或者包冲突导致启动失败。解决方法:删掉springframe的包即可。

②下面这个错误也是包问题

Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.validation.beanvalidation.LocalValidatorFactoryBean]: Factory method 'defaultValidator' threw exception; nested exception is java.lang.NoClassDefFoundError: org/hibernate/validator/internal/engine/DefaultClockProvider
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:579)
... 18 common frames omitted
Caused by: java.lang.NoClassDefFoundError: org/hibernate/validator/internal/engine/DefaultClockProvider

错误是因为引入了这个包造成的,这个包是干嘛的?

软件包 javax.xml.validation 的描述 此包提供了用于 XML 文档验证的 API。Validation 是验证XML 文档是否为指定 XML schema 的实例的过程。XML模式定义了其实例文档将表示的内容模型(也称为 grammar 或 vocabulary),迁移springboot就是剔除所有的xml,所以xml都没了,检测xml造成错误了(自我理解哈)

java.lang.NoClassDefFoundError: org/hibernate/validator/internal/engine/DefaultClockProvider的更多相关文章

  1. Caused by: java.lang.AbstractMethodError: org.hibernate.validator.internal.engine.ConfigurationImpl

    1.错误描述 严重: StandardWrapper.Throwable org.springframework.beans.factory.BeanCreationException: Error ...

  2. nested exception is java.lang.NoClassDefFoundError: org/hibernate/validator/resourceloading/ResourceBundleLocator

    原来的hibernate-validator-5.3.0.Final.jar里没有这个接口,换成 hibernate-validator-4.1.0.Final.jar 就好了

  3. hibernate 解决 java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.validator.internal.engine.xxx 这类的问题

    <!-- 解决 java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.validator.intern ...

  4. 解决Could not open Hibernate Session for transaction; nested exception is java.lang.NoClassDefFoundError: org/hibernate/engine/transaction/spi/TransactionContext

    我使用的是5.2.8的hibernate的jar包,运行的时候却报错Could not open Hibernate Session for transaction; nested exception ...

  5. 【日常错误】Could not initialize class org.hibernate.validator.internal.engine.ConfigurationImpl

    最近在用spring-boot编写一个Lucene项目,中间用到了redis,引用了spring-boot-starter-data-redis,在eclipse中用外部Tomcat启动项目一切正常, ...

  6. Caused by: java.lang.NoClassDefFoundError: org/hibernate/cfg/Configuration

    1.错误描述 usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] { -help ...

  7. java.lang.NoClassDefFoundError: org/hibernate/cfg/Configuration解决方法

    Autowiring of fields failed; nested exception is...........Error creating bean with name 'siteOperat ...

  8. java.lang.NoClassDefFoundError: org/hibernate/QueryTimeoutException

    在做ssh整合的时候报错:java.lang.NoClassDefFoundError: org/hibernate/QueryTimeoutException org.springframework ...

  9. java.lang.NoClassDefFoundError: org/hibernate/cfg/Configuration

    java.lang.NoClassDefFoundError: org/hibernate/cfg/Configuration 最近在做项目的时候遇到了这个问题,很是困扰,多次尝试后发现是jar包的问 ...

随机推荐

  1. 『GCD』详解

    2. GCD 任务和队列 学习 GCD 之前,先来了解 GCD 中两个核心概念:任务和队列. 任务:就是执行操作的意思,换句话说就是你在线程中执行的那段代码.在 GCD 中是放在 block 中的.执 ...

  2. mysql查看所有存储过程,函数,视图,触发器,表

    查询数据库中的存储过程和函数 方法一: select `name` from mysql.proc where db = 'your_db_name' and `type` = 'PROCEDURE' ...

  3. EXISTS 执行顺序 CLR-2-2-引用类型和值类型

    EXISTS 执行顺序   select * from a where a.s_status=1 and exists (select orderid from b on a.orderid=b.or ...

  4. 【Android】自己定义View

    翻译自:http://developer.android.com/training/custom-views/index.html 一)创建view类 一个设计良好的自己定义view与其它的类一样.它 ...

  5. Codeforces(429D - Tricky Function)近期点对问题

    D. Tricky Function time limit per test 2 seconds memory limit per test 256 megabytes input standard ...

  6. Eclipse的安装使用

    1.从官网下载最新的Eclipse http://www.eclipse.org/downloads/

  7. Bootstrap tabs 源码分析

    前言: 阅读建议:去github下载一个完整dom然后把,本篇代码复制进去然后运行就好了以地址 tab组件是非常简单的一种组件,因为这是一个系列,所以就顺便看了,其实它写的这个还算不错的,很有条例,也 ...

  8. LAMP安装问题【已解决】

    1.编译不通过提示cannot find mysql header files under /usr/local/mysql解决办法:修改./configuer  --with-mysql=/usr/ ...

  9. su 认证失败

    jiqing@ThinkPad:~$ su 密码: su:认证失败 jiqing@ThinkPad:~$ sudo passwd root [sudo] password for jiqing: 输入 ...

  10. 【Silverlight】Bing Maps学习系列(七):使用Bing Maps的图片系统(Tile System)

    [Silverlight]Bing Maps学习系列(七):使用Bing Maps的图片系统(Tile System) 目前包括微软必应地图在内的几乎所有在线电子地图(如:Google Maps等)都 ...