[MAGNOLIA-5431] ConvertMetaDataUpdateTask generate exceptions during upgrade from M4.5 to M5 Created: 30/Oct/13  Updated: 07/Nov/13  Resolved: 06/Nov/13

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: 5.1.1
Fix Version/s: 5.2

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

Attachments: Text File MetaDataAsMixinConversionHelper.patch     Text File damOutPut.txt    
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
Epic Link: Enable 4.5 to 5.x upgrade
Sprint: 5.2-rc1

 Description   

ConvertMetaDataUpdateTask generate the following exception during upgrade from M4.5 to M5.

Condition: M4.5 repo with uploaded images within FCK editor, custom categories and RSS linked to images.

To Investigate:
This is one of the first task to run:

  • M4.5 repo do not have a dam workspace
    but this task fails by trying to handle a frozen dam node from the dam workspace:
  • /jcr:system/jcr:versionStorage/d1/b4/b5/d1b4b57d-3b5d-41ae-85f2-8ed2e4c186ea/1.0/jcr:frozenNode mgnl:lastModifiedBy

This node refers to the standard article page where I added the FCK embedded images.
Without embedded images, the task do not fail.

2013-10-30 18:12:06,295 ERROR info.magnolia.module.InstallContextImpl           : > Could not install or update core module. Task 'Convert MetaData Task' failed. (ConstraintViolationException: Unable to perform operation. Node is protected.)
info.magnolia.module.delta.TaskExecutionException: Could not execute task: Constraint violation: Unable to perform operation. Node is protected.
	at info.magnolia.module.delta.AbstractRepositoryTask.execute(AbstractRepositoryTask.java:62)
	at info.magnolia.module.ModuleManagerImpl.applyDeltas(ModuleManagerImpl.java:512)
	at info.magnolia.module.ModuleManagerImpl.installOrUpdateModule(ModuleManagerImpl.java:494)
	at info.magnolia.module.ModuleManagerImpl$1.doExec(ModuleManagerImpl.java:277)
	at info.magnolia.context.MgnlContext$VoidOp.exec(MgnlContext.java:415)
	at info.magnolia.context.MgnlContext$VoidOp.exec(MgnlContext.java:1)
	at info.magnolia.context.MgnlContext.doInSystemContext(MgnlContext.java:386)
	at info.magnolia.module.ModuleManagerImpl.performInstallOrUpdate(ModuleManagerImpl.java:271)
	at info.magnolia.module.ui.ModuleManagerWebUI$2.run(ModuleManagerWebUI.java:127)
	at java.lang.Thread.run(Thread.java:680)
Caused by: javax.jcr.nodetype.ConstraintViolationException: Unable to perform operation. Node is protected.
	at org.apache.jackrabbit.core.ItemValidator.checkCondition(ItemValidator.java:276)
	at org.apache.jackrabbit.core.ItemValidator.checkModify(ItemValidator.java:248)
	at org.apache.jackrabbit.core.PropertyImpl.checkSetValue(PropertyImpl.java:278)
	at org.apache.jackrabbit.core.PropertyImpl.setValue(PropertyImpl.java:726)
	at org.apache.jackrabbit.core.NodeImpl$SetPropertyOperation.perform(NodeImpl.java:2054)
	at org.apache.jackrabbit.core.NodeImpl$SetPropertyOperation.perform(NodeImpl.java:1998)
	at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:216)
	at org.apache.jackrabbit.core.NodeImpl.setProperty(NodeImpl.java:1920)
	at info.magnolia.jcr.wrapper.DelegateNodeWrapper.setProperty(DelegateNodeWrapper.java:377)
	at info.magnolia.jcr.decoration.ContentDecoratorNodeWrapper.setProperty(ContentDecoratorNodeWrapper.java:254)
	at info.magnolia.jcr.wrapper.LastUpdateNodeWrapper.setProperty(LastUpdateNodeWrapper.java:174)
	at info.magnolia.jcr.wrapper.DelegateNodeWrapper.setProperty(DelegateNodeWrapper.java:377)
	at info.magnolia.jcr.decoration.ContentDecoratorNodeWrapper.setProperty(ContentDecoratorNodeWrapper.java:254)
	at info.magnolia.jcr.wrapper.DelegateNodeWrapper.setProperty(DelegateNodeWrapper.java:377)
	at info.magnolia.jcr.decoration.ContentDecoratorNodeWrapper.setProperty(ContentDecoratorNodeWrapper.java:254)
	at info.magnolia.audit.MgnlAuditLoggingContentDecoratorNodeWrapper.setProperty(MgnlAuditLoggingContentDecoratorNodeWrapper.java:119)
	at info.magnolia.importexport.postprocessors.MetaDataAsMixinConversionHelper.moveProperty(MetaDataAsMixinConversionHelper.java:245)
	at info.magnolia.importexport.postprocessors.MetaDataAsMixinConversionHelper.moveProperties(MetaDataAsMixinConversionHelper.java:223)
	at info.magnolia.importexport.postprocessors.MetaDataAsMixinConversionHelper.processNode(MetaDataAsMixinConversionHelper.java:163)
	at info.magnolia.importexport.postprocessors.MetaDataAsMixinConversionHelper.convertNodeAndChildren(MetaDataAsMixinConversionHelper.java:127)
	at info.magnolia.setup.for5_0.ConvertMetaDataUpdateTask.doExecute(ConvertMetaDataUpdateTask.java:76)
	at info.magnolia.module.delta.AbstractRepositoryTask.execute(AbstractRepositoryTask.java:60)
	... 9 more


 Comments   
Comment by Eric Hechinger [ 30/Oct/13 ]

Nodes handled for the dam workspace by this task.

Comment by Eric Hechinger [ 30/Oct/13 ]

Patch that allows to solve the issue.
This patch excludes from the handling all nodes with a name starting by jcr: or rep:

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