[Archivesspace_Users_Group] Subject migration error, migrating from Archon

Trevor Thornton trthorn2 at ncsu.edu
Tue Oct 30 14:47:36 EDT 2018


I can provide an incomplete answer and hopefully somebody will chime in
with more/better info.

The immediate cause of the error seems to be that the subject record that's
being written to the database either includes a value for vocab_id that
doesn't correspond to an id from the 'vocabularies' table, or that the
value is missing from the query (which writes a NULL in the vocab_id
column). Either of these would cause an error at the database level where
this constraint (that values for vocab_id must correspond to the id of a
record in 'vocabularies') is enforced. I think a NULL value would actually
throw a different error so the bad vocab_id seems more likely to me.

In our instance we only have one vocabulary, which is the default named
'global' with id 1.

On Tue, Oct 30, 2018 at 9:38 AM Huebschen, Alan M <ahueb2 at uis.edu> wrote:

> Good morning all,
>
>
>
> Does anyone know what might cause the following error? It sounds like a
> database issue, but I’ve started with a clean database on each migration
> attempt. All subjects fail to migrate with the same error, everything else
> appears to go over smoothly.
>
>
>
> Endpoint: http://localhost:8089/subjects
>
> AR Identifier:Subject->Ledgers
>
> Status code: 400
>
> Status text: Bad Request
>
> {"error":{"db_error":["Database integrity constraint conflict:
> Java::JavaSql::SQLIntegrityConstraintViolationException: Cannot add or
> update a child row: a foreign key constraint fails
> (`archivesspace`.`subject`, CONSTRAINT `subject_ibfk_2` FOREIGN KEY
> (`vocab_id`) REFERENCES `vocabulary` (`id`))"]}}
>
>
>
> -Alan Huebschen
>
> Brookens Library
>
> Information Systems
>
> (217) 206-7115
>
>
> _______________________________________________
> Archivesspace_Users_Group mailing list
> Archivesspace_Users_Group at lyralists.lyrasis.org
> http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group
>


-- 
Trevor Thornton
Applications Developer, Digital Library Initiatives
North Carolina State University Libraries
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20181030/123f09c4/attachment.html>


More information about the Archivesspace_Users_Group mailing list