Receiving Duplicate error on alf_child_assoc

cancel
Showing results for 
Search instead for 
Did you mean: 
michaelc
Active Member

Receiving Duplicate error on alf_child_assoc

Hoping for some input.
in my logs I find this error occurring 100's of times.

; SQL []; Duplicate entry '637884-33-3698713139-feedbacksummary_0dba58dd-8681-4a0a-99e0-159' for key 'parent_node_id'; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '637884-33-3698713139-feedbacksummary_0dba58dd-8681-4a0a-99e0-159' for key 'parent_node_id'
 at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:245)
 at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
 at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:74)
 at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:421)
 at com.sun.proxy.$Proxy17.insert(Unknown Source)
 at org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:254)
 at org.alfresco.repo.domain.node.ibatis.NodeDAOImpl.insertChildAssoc(NodeDAOImpl.java:932)
 at org.alfresco.repo.domain.node.AbstractNodeDAOImpl.newChildAssocInsertImpl(AbstractNodeDAOImpl.java:3236)
 ... 64 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '637884-33-3698713139-feedbacksummary_0dba58dd-8681-4a0a-99e0-159' for key 'parent_node_id'

. . .

### Error updating database.  Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '637884-33-3698713139-feedbacksummary_0dba58dd-8681-4a0a-99e0-159' for key 'parent_node_id'
### The error may involve alfresco.node.insert.insert_ChildAssoc-Inline
### The error occurred while setting parameters
### SQL: insert into alf_child_assoc         (             version, parent_node_id, child_node_id, type_qname_id,             child_node_name_crc, child_node_name,             qname_ns_id, qname_localname, qname_crc,             is_primary, assoc_index         )         values         (             ?, ?, ?, ?,             ?, ?,             ?, ?, ?,             ?, ?         )
### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '637884-33-3698713139-feedbacksummary_0dba58dd-8681-4a0a-99e0-159' for key 'parent_node_id'

Then I looked into the table, I don't find that key in parent_node_id.
I do find several 637884 but the field is 20 char so this left me confused.

any idea what is causing this and how to resolve?
Release Alfresco Content Services started (Community). Current version: 5.2.0

'alfresco-share-services' version 5.2.0.

'org_alfresco_module_wcmquickstart' version 5.2.f.

Regards

4 Replies
afaust
Master

Re: Receiving Duplicate error on alf_child_assoc

The issue is not with the parent_node_Id column, but with the unique index of the same name on that column and a slew of other colums. Some of the dashes in the '637884-33-3698713139-feedbacksummary_0dba58dd-8681-4a0a-99e0-159' key value link the values of different columns. So you have parent_node_id 637884, type_qname_id 33, child_node_name_crc 3698713139, child_node_name feedbacksummary_0dba58dd-8681-4a0a-99e0-159. Somehow you have a conflict with another row in the alf_child_assoc table with the same values for these columns.

martinsc
Member II

Re: Receiving Duplicate error on alf_child_assoc

Good Morning,

I have the same issue since 27.Aug.2018 02:55:56 ...

And I just cannot explain how this could happen.

The system runs now for more than a year without any error message.

The error came all of a sudden and repeats from since every some 5 minutes.

Any idea how I can get rid of it?

Thanks for helping,

Martin

The description for Event ID 0 from source PostgreSQL cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event:

ERROR: duplicate key value violates unique constraint "parent_node_id"
DETAIL: Key (parent_node_id, type_qname_id, child_node_name_crc, child_node_name)=(12673, 35, 274358454, ay9_a003060.sirslt) already exists.
STATEMENT: insert into alf_child_assoc
(
id, version, parent_node_id, child_node_id, type_qname_id,
child_node_name_crc, child_node_name,
qname_ns_id, qname_localname, qname_crc,
is_primary, assoc_index
)
values
(
$1, $2, $3, $4, $5,
$6, $7,
$8, $9, $10,
$11, $12
)

michaelc
Active Member

Re: Receiving Duplicate error on alf_child_assoc

I never really resolved this, I changed the id number, thus it was unique and the error stopped. 
never figured out why I got it or what it's was trying to get.

martinsc
Member II

Re: Receiving Duplicate error on alf_child_assoc

Thanks for helping.

I just wanted to change this specific data set, but then I found out, that the error has suddenly stopped without any input.

It has gone like it has been appearing ...

Martin