严重: Servlet.service() for servlet [spring-mvc] in context with path [/learn] threw exception [Request processing failed; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement] with root cause
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry 'admin' for key 'UK_dgxl7aijrr4hq8314exhw407s'
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

1、MySQLIntegrityConstraintViolationException是指外键出错了

2、Duplicate entry 'admin'for key 'PRIMARY'是指重复了  我的用户名设为唯一了

com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry 'admin' for key 'UK_dgxl7aijrr4hq8314exhw407s'的更多相关文章

  1. com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '88888888' for key 'PRIMARY'

    严重: Servlet.service() for servlet jsp threw exceptioncom.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityC ...

  2. Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry 'qingmu' for key 'PRIMARY'

    ### Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolatio ...

  3. java PageHelper 分页插件出现 Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Duplicate column name 'Id' 错误

    情景: Mapper.xml定义连表查询,如果sql的字段名中有sql关键字,会导致PageHelper插件出现 com.mysql.jdbc.exceptions.jdbc4.MySQLSyntax ...

  4. com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException 异常

    MySQL完整性约束破坏异常:com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException 在单向多对一关联关系 ...

  5. Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column 'org_mer_id' in where clause is ambiguous

    ### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolatio ...

  6. error:com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException

    问题:同样的代码,只能插入一组值,第二组值插入不了 解决:开始我将app_id作为主键,但很明显,同一个app_id会有不同的index,而同一个index也可能对应不同的app_id,因此只能添加一 ...

  7. com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'dd' in 'where clause'

    今天在使用mysql数据库查找数据的时候报错,错误信息如下: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown co ...

  8. com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure 解决办法

    09:00:30.307 [http-8080-6] ERROR org.hibernate.transaction.JDBCTransaction -JDBC begin failed com.my ...

  9. mysql 数据库问题com.mysql.jdbc.exceptions.jdbc4.CommunicationsException

    本文转自:http://blog.csdn.net/zmzsoftware/article/details/6835604 MySQL第二天早上第一次连接超时报错,解决方法com.mysql.jdbc ...

随机推荐

  1. ICMP,ARP协议

    ICMP ICMP是(Internet Control Message Protocol)Internet控制报文协议.它是TCP/IP协议族的一个子协议,用于在IP主机.路由器之间传递控制消息.控制 ...

  2. SpringMVC与MyBatis整合方法

    一.springmvc+mybaits的系统架构: 第一步:整合dao层 mybatis和spring整合,通过spring管理mapper接口. 使用mapper的扫描器自动扫描mapper接口在s ...

  3. (5.2.1)配置服务器参数——即时文件初始化(IFI)

    关键词:零填充,即时文件初始化 转自:https://www.cnblogs.com/gaizai/p/3516905.html 概念: 所有新申请的空间,sql server都要以0来填充完磁盘文件 ...

  4. 零基础到精通Linux,从这篇文章开始

    2018年想做Linux运维的人应该如何学习才能快速精通Linux? Linux入门这么简单,为什么很多人学不会? 想要成为一个合格的运维工程师,到底怎么才能从零开始精通Linux? 作为一个运维小白 ...

  5. Django - ORM创建基本类

    DBFirst CodeFirst 创建类 1.根据类自动创建数据库表 在app下的models.py中创建表 创建数据库之前,需要在django下的setting.py模块中的INSTALLED_A ...

  6. js 阻止冒泡事件和默认事件

    阻止事件冒泡 window.enent ? window.enent.cancelBubble = true : e.stopPropagation() function stopBubble(eve ...

  7. Django View(视图系统)

    Django View 官方文档 一个视图函数(类),简称视图,是一个简单的 Python 函数(类),它接受Web请求并且返回Web响应.响应可以是一张网页的HTML内容,一个重定向,一个404错误 ...

  8. JS练习:表格全选与全不选

    代码: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title ...

  9. namespace的作用及用法

    namespace 所谓namespace,是指标识符的可见范围.C++标准库中的所有标识符都被定义在一个名为 std 的namespace 中. 一.<iostream>和<ios ...

  10. 48.cartinality的基本用法

    主要知识点 cartinality的用法     es去重用的是cartinality metric算法,对每个bucket中的指定的field进行去重,然后获取去重后的count,类似于count( ...