tylerbenson / vyllage

https://www.vyllage.com
4 stars 0 forks source link

[Skill Section] Adding and deleting skills generates an error #1225

Closed UnspeakableHorror closed 8 years ago

UnspeakableHorror commented 8 years ago

For some reason it's trying to save the same section id and version twice:

 Jan 21 11:35:27 ip-172-31-47-79 Vyllage: [E] o.a.c.c.C.[.[.[.[dispatcherServlet]:  Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException: jOOQ; SQL [insert into documents.document_sections (id, sectionversion, documentid, position, jsondocument, datecreated, lastmodified) values (?, ?, ?, ?, ?, cast(? as timestamp), cast(? as timestamp)) returning documents.document_sections.id, documents.document_sections.sectionversion]; 
ERROR: duplicate key value violates unique constraint '''"document_sections_pkey"   Detail: Key (id, sectionversion)=(249, 53) already exists.; 
nested exception is org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "document_sections_pkey"   

Detail: Key (id, sectionversion)=(249, 53) already exists.] with root cause org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "document_sections_pkey"   Detail: Key (id, sectionversion)=(249, 53) already exists.  at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2182)   at
 org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1911)   at 
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:173)    at 
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:645)    at 
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:495) 
UnspeakableHorror commented 8 years ago

The frontend is sending two put requests, sometimes this generates the reported error.

UnspeakableHorror commented 8 years ago

This only happens for Skill and Career Interests, the others generate a single PUT request.