Caused by: java.sql.BatchUpdateException: Duplicate entry 'username:******** for key 'PRIMARY'

767 views
Skip to first unread message

praveenm

unread,
Sep 26, 2014, 6:19:59 AM9/26/14
to repo-d...@googlegroups.com
Hi All,

We are facing the below error in gerrit 2.8.6.1 & user (*********) is unable to login to gerrit .

Caused by: java.sql.BatchUpdateException: Duplicate entry 'username:******** for key 'PRIMARY'

    at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2054)

    at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1467)

    at com.google.gwtorm.schema.sql.SqlDialect.executeBatch(SqlDialect.java:390)

    at com.google.gwtorm.jdbc.JdbcAccess.execute(JdbcAccess.java:447)

    at com.google.gwtorm.jdbc.JdbcAccess.insertAsBatch(JdbcAccess.java:211)

    at com.google.gwtorm.jdbc.JdbcAccess.insert(JdbcAccess.java:164)

    ... 50 more

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

    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:534)

    at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)

    at com.mysql.jdbc.Util.getInstance(Util.java:386)

    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1040)

    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4074)

    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4006)

    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2468)

    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2629)

    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2719)

    at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2155)

    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2450)

    at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2006)


--------------------------------------------------------------------
mysql version :Server version: 5.5.32-log Source distribution

my.cnf  configuration

[mysqld]
port        = 3306
socket      = /var/run/mysqld/mysqld.sock
skip-external-locking
key_buffer_size = 128M
max_allowed_packet =2M
table_open_cache = 512
sort_buffer_size = 8M
read_buffer_size = 16M
read_rnd_buffer_size = 32M
myisam_sort_buffer_size = 16M
thread_cache_size = 10
query_cache_size = 32M


# User config

transaction-isolation = READ-COMMITTED
character-set-server=utf8
collation-server=utf8_general_ci
skip-character-set-client-handshake
skip-name-resolve
max_connections        = 500

#default-storage-engine = InnoDB
innodb_file_per_table = 1
innodb_flush_method = O_DIRECT
innodb_buffer_pool_size = 3G
innodb_thread_concurrency = 16
#innodb_log_file_size = 128M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 2

query_cache_type = 1
query_cache_limit = 50M
query_cache_size = 256M

log-slow-queries = /var/log/mysql/slowqueries.log
long_query_time = 3
log=/cdddddddddddd/mysql_query.log


[mysqldump]
quick
max_allowed_packet = 32M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[myisamchk]
key_buffer_size = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout
------------------------------------------------------------------------------------------------

any help on this please.

Thanks

Praveen



Reply all
Reply to author
Forward
0 new messages