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

wireshark - USB mapping with python -

c++ - nodejs socket.io closes connection before upgrading to websocket -

Deploying Qt Application on Android is really slow? -