Uploaded image for project: '[Read Only] - Hippo Repository'
  1. [Read Only] - Hippo Repository
  2. REPO-2249

Log node paths if applying yaml configuration fails

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • 14.0.0, 13.4.1, 5.6.8
    • None
    • None
    • Flagged
    • Platform 220 - Hardening

    Description

      When changing a node type though yaml, this can go wrong when applying it. Makes sense that a ConstraintViolationException is thrown, however the exception handling in ConfigurationServiceImpl#applyConfig does not state the node path involved.

      13.09.2019 10:04:33 ERROR main [ConfigurationServiceImpl.applyConfig:952] Failed to apply configjavax.jcr.nodetype.ConstraintViolationException: no matching property definition found for {http://www.hippoecm.org/hst/nt/2.1}componentclassname at org.apache.jackrabbit.core.nodetype.EffectiveNodeType.getApplicablePropertyDef(EffectiveNodeType.java:782) ~[jackrabbit-core-2.16.2-h3.jar:2.16.2-h3] at org.apache.jackrabbit.core.NodeImpl.getApplicablePropertyDefinition(NodeImpl.java:843) ~[jackrabbit-core-2.16.2-h3.jar:13.2.2] at org.apache.jackrabbit.core.ItemManager.getDefinition(ItemManager.java:255) ~[jackrabbit-core-2.16.2-h3.jar:13.2.2] at org.apache.jackrabbit.core.NodeImpl.setPrimaryType(NodeImpl.java:3333) ~[jackrabbit-core-2.16.2-h3.jar:13.2.2] at org.hippoecm.repository.impl.NodeDecorator.setPrimaryType(NodeDecorator.java:493) ~[hippo-repository-engine-13.2.2.jar:13.2.2] at org.onehippo.cm.engine.ConfigurationConfigService.computeAndWritePrimaryTypeDelta(ConfigurationConfigService.java:492) ~[hippo-repository-engine-13.2.2.jar:13.2.2] 
      

      Since there's recursion involved, suggestion to catch exceptions in ConfigurationConfigService#computeAndWriteNodeDelta, log node path and rethrow.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jhoffman Jeroen Hoffman
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: