[MGNLDAM-14] DMSToDAM migration sometimes fails Created: 13/Nov/12  Updated: 11/Feb/13  Resolved: 26/Nov/12

Status: Closed
Project: Magnolia DAM Module
Component/s: None
Affects Version/s: 1.0
Fix Version/s: 1.0

Type: Bug Priority: Major
Reporter: Daniel Lipp Assignee: Eric Hechinger
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
dependency
is depended upon by MGNLEE-248 As a customer I can install the EE bu... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

The bad thing about this bug is, that it's only happening on rare occasions so it's not really reproducible. It already happend when the affected task was created but we thought we could work around it by using ContentUtil.changeNodeType() instead of Node.setPrimaryType(). As this did not really fix the problem, we should now analyze in detail and get rid of it.

Stacktrace:
[INFO] [talledLocalContainer] info.magnolia.module.delta.TaskExecutionException: Could not convert contentnodes to DAM format. /demo-project/img/bk/Opener/v-light-3: mandatory child node

{http://www.jcp.org/jcr/1.0}

content does not exist
[INFO] [talledLocalContainer] at info.magnolia.dam.setup.MigrateContentFromDMSToDAMTask.convertContentNodesToDAM(MigrateContentFromDMSToDAMTask.java:183)
[INFO] [talledLocalContainer] at info.magnolia.dam.setup.MigrateContentFromDMSToDAMTask.doExecute(MigrateContentFromDMSToDAMTask.java:74)
[INFO] [talledLocalContainer] at info.magnolia.module.delta.AbstractRepositoryTask.execute(AbstractRepositoryTask.java:60)

No idea why that enforced child node is sometimes not around.



 Comments   
Comment by Daniel Lipp [ 13/Nov/12 ]

It also happens in the silent installation of ee-bundle (looks like there it's locally reproducible)

Comment by Eric Hechinger [ 26/Nov/12 ]

Resolved by changing the order of move, set primary type call. Refer to MoveDataRepositoryToDAMMigrationTask and associated test case for reproducing this error.
In createDataVisitor(), comment the first occurrence of node.setPrimaryType("mgnl:asset"); and uncomment the second occurrence.

MoveDataRepositoryToDAMMigrationTaskTest will then fail.

Generated at Mon Feb 12 04:55:43 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.