Duplicate entry 'javajavajav' for key 'username'

摘要:
,密码=?哪里(姓名?

org.apache.ibatis.exceptions.PersistenceException:
### Error updating database.  Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry 'javajavajav' for key 'username'
### The error may involve cn.itcast.mybatis.mapper.NewUserMapper.updateByExampleSelective-Inline
### The error occurred while setting parameters
### SQL: UPDATE tb_user SET USER_NAME = ?, PASSWORD = ? WHERE (  NAME  like ? )
### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry 'javajavajav' for key 'username'
    at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:26)
    at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:154)
    at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:54)
    at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:52)
    at com.sun.proxy.$Proxy11.updateByExampleSelective(Unknown Source)
    at cn.itcast.mybatis.mapper.NewUserMapperTest.testUpdateByExampleSelective(NewUserMapperTest.java:184)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry 'javajavajav' for key 'username'
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:408)
    at com.mysql.jdbc.Util.getInstance(Util.java:383)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1049)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4208)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4140)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2597)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2758)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2826)
    at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2082)
    at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1302)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:62)
    at com.sun.proxy.$Proxy16.execute(Unknown Source)
    at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:44)
    at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:69)
    at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:48)
    at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:105)
    at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:71)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.ibatis.plugin.Invocation.proceed(Invocation.java:49)
    at com.github.abel533.mapperhelper.MapperInterceptor.intercept(MapperInterceptor.java:61)
    at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:60)
    at com.sun.proxy.$Proxy10.update(Unknown Source)
    at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:152)
    ... 28 more


唯一键  UserName     不可重复

免责声明:文章转载自《Duplicate entry 'javajavajav' for key 'username'》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇VUE 网页端改成桌面端(Electron)Python深入:Distutils安装包下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

随便看看

ES开启慢查询日志

10s#超过10秒的查询将生成警告日志index.search.slowlog.threshold.query.info:5s#超过5秒的查询会生成信息日志index.search.slowlog.tthreshold.query.debug:...

【646】灰度图array转为RGB三通道array

可以使用两种方法:numpy可以通过cv2.cvtColor函数自行实现。灰度图像可以转换为RGB的所谓灰度图像,分成三个通道,这意味着三个通道都是相同的信息,相当于相同维度信息的重复。主要通过numpy实现。阵列,其可以类似于广播的形式实现。...

IIS 中 "另一个程序正在使用此文件,进程无法访问!"

然而,自从昨晚重新启动机器后,发现iis无法启动。手动启动并提示:“另一个程序正在使用此文件,进程无法访问它!”百度得知这是由港口冲突造成的。什么软件使用端口80?同时,我更改了iis的默认端口80,没问题。接下来,我想知道是哪一方秘密占用了端口80。但是,在执行上述命令后,我没有找到占用端口80的程序。我惊讶地发现没有人占用端口80。...

Flutter——数组以符号隔开转字符串

///数组转换为字符串StringgetTaskScreen(Listlist){ListtempList=List();Stringstr='';List.forEach((f){tempList.add(f.title);});临时列表。forEach((f){if(str==“”){str=“$f”;}否则{str=“$str”,“$f”;}});re...

学习Python3 天眼查 爬虫

在开始学习Python时,我不想看基础知识,而且我的记忆力很差。我记不住那些语法,所以我直接去了这个项目。这是相当深刻的。刚好公司有情况需要检查企业的信息,所以我想成为一名爬虫。那些有验证码的人不愿意这样做。这是个大问题。我选择了天眼查,跳过检查过程,直接写下结果。总结的步骤如下:首先,天眼查最大的障碍是字体问题。本网站上有介绍,大致意思是网页上显示的一些字...

axios 处理超时问题 记录

前言:记录最近两天处理请求超时的逻辑。...