[MAGNOLIA-1980] update: update fails with a ConstraintViolationException if workflows are in progress Created: 21/Dec/07  Updated: 23/Jan/13  Resolved: 10/Jan/08

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: 3.5.2
Fix Version/s: 3.5.3

Type: Bug Priority: Critical
Reporter: Philipp Bärfuss Assignee: Vivian Steller
Resolution: Workaround exists Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: XML File custom_nodetypes.xml    
Issue Links:
relation
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   

Could not perform installation: javax.jcr.nodetype.ConstraintViolationException: /owfe/activation/1196324976061.0/0.1.0__loop: mandatory child node {}MetaData does not exist
at org.apache.jackrabbit.core.ItemImpl.validateTransientItems(ItemImpl.j
ava:549)



 Comments   
Comment by Philipp Bracher [ 21/Dec/07 ]

To fix that you have to replace the file repositories/magnolia/repository/nodetypes/custom_nodetypes.xml before you start updating with the one of 3.5

Comment by Philipp Bracher [ 21/Dec/07 ]

You can use the attached file

Comment by Vivian Steller [ 10/Jan/08 ]

this only happens when updating from a version pre-3.0.2 (maybe transiently, if you updated 3.0.1 > (ok) > 3.0.2 > (crash) > 3.5).

some more detailed explanation: 3.0.1 had a nodetype definition of the expression node in place that sais "metaData is mandatory" (see owfe-nodetypes.xml in workflow module). This nodetype definition is copied to the repositories/magnolia/repository/nodetypes/custom_nodetypes.xml file when installing 3.0.1. When updating this instance to 3.5 (by either replacing jars or copying the repository to a newly created instance) an update task of 3.5 removes the metadata node. Since you then still have the original custom_nodetypes.xml file in place Jackrabbit complains with the exception above.

As mentioned before, fix this by adjusting the appropriate expression nodetype in custom_nodetypes.xml or just replace the whole file with the one attached entirely.

Generated at Mon Feb 12 03:32:13 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.