java - org.hibernate.util.JDBCExceptionReporter] Duplicate entry X for key 'PRIMARY' -


i writing back-end java code active-mq in producer consumer model. when multiple consumers runs using , try update in table question following exception occured , transaction rollbacked. multiple threads running inside each consumer task.

warn  [org.hibernate.util.jdbcexceptionreporter] sql error: 1062, sqlstate: 23000  07:10:31,609 error [org.hibernate.util.jdbcexceptionreporter] duplicate entry '69-947' key 'primary'  07:10:31,615 error [com.xminds.bestfriend.consumers.questiongeneration] exception failed question generation   org.springframework.dao.dataintegrityviolationexception: not insert: [com.xminds.bestfriend.frontend.model.friendship]; 

any 1 can suggest solution this.

i think trying insert record using existing primary key. make sure primary key unique.


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -