com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException

Duplicate entry 'XYZ' for key 'PRIMARY'

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web601

Stack trace

  • com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry 'XYZ' for key 'PRIMARY' at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at com.mysql.jdbc.Util.handleNewInstance(Util.java:404) at com.mysql.jdbc.Util.getInstance(Util.java:387) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:934) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3870) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3806) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2470) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2617) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2550) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1861) at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1192) at vg.civcraft.mc.bettershards.database.DatabaseManager.savePlayerData(DatabaseManager.java:327) at vg.civcraft.mc.bettershards.misc.CustomWorldNBTStorage.save(CustomWorldNBTStorage.java:54) at net.minecraft.server.v1_10_R1.PlayerList.savePlayerFile(PlayerList.java:315) at net.minecraft.server.v1_10_R1.PlayerList.disconnect(PlayerList.java:389) at net.minecraft.server.v1_10_R1.PlayerConnection.a(PlayerConnection.java:1058) at net.minecraft.server.v1_10_R1.PlayerConnection.disconnect(PlayerConnection.java:243) at org.bukkit.craftbukkit.v1_10_R1.entity.CraftPlayer.kickPlayer(CraftPlayer.java:218) at fr.neatmonster.nocheatplus.command.actions.KickCommand.kick(KickCommand.java:54) at fr.neatmonster.nocheatplus.command.actions.KickCommand.onCommand(KickCommand.java:47) at fr.neatmonster.nocheatplus.command.NoCheatPlusCommand.onCommand(NoCheatPlusCommand.java:162) at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) at org.bukkit.craftbukkit.v1_10_R1.CraftServer.dispatchCommand(CraftServer.java:646) at fr.neatmonster.nocheatplus.command.actions.delay.DelayCommand$1.run(DelayCommand.java:48) at org.bukkit.craftbukkit.v1_10_R1.scheduler.CraftTask.run(CraftTask.java:71) at org.bukkit.craftbukkit.v1_10_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:350) at net.minecraft.server.v1_10_R1.MinecraftServer.D(MinecraftServer.java:741) at net.minecraft.server.v1_10_R1.DedicatedServer.D(DedicatedServer.java:399) at net.minecraft.server.v1_10_R1.MinecraftServer.C(MinecraftServer.java:672) at net.minecraft.server.v1_10_R1.MinecraftServer.run(MinecraftServer.java:571) at java.lang.Thread.run(Thread.java:745)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

MattyMatty
4 times, last one
chenjunjunchenjunjun
3 times, last one
Unknown visitor
Unknown visitorOnce,
kidkid
3 times, last one
Unknown visitor
Unknown visitorOnce,
62 more bugmates