Esv2yaml error: Missing required property jcr:primaryType for node

When running the esv2yaml.jar to upgrade from cms 11.2.9 to cms 12.0.2, I get the following error regarding the hst-folder-views node:

27.03.2019 12:06:35 ERROR [org.onehippo.cm.migration.Esv2Yaml.main():154] Esv2Yaml.convert() failed: Missing required property jcr:primaryType for node /hippo:configuration/hippo:frontend/cms/hst-folder-views at /Users/jean.mccallum/work12-upgrade/dhihippo/repository-data/application/src/main/resources/configuration/frontend/cms.xml [8,56]
org.onehippo.cm.migration.EsvParseException: Missing required property jcr:primaryType for node /hippo:configuration/hippo:frontend/cms/hst-folder-views at /Users/jean.mccallum/work12-upgrade/dhihippo/repository-data/application/src/main/resources/configuration/frontend/cms.xml [8,56]
at org.onehippo.cm.migration.SourceInitializeInstruction.processNode(SourceInitializeInstruction.java:323) ~[esv2yaml.jar:1.6.1]
at org.onehippo.cm.migration.SourceInitializeInstruction.processNode(SourceInitializeInstruction.java:396) ~[esv2yaml.jar:1.6.1]
at org.onehippo.cm.migration.SourceInitializeInstruction.processSource(SourceInitializeInstruction.java:182) ~[esv2yaml.jar:1.6.1]
at org.onehippo.cm.migration.Esv2Yaml.processInitializeInstructions(Esv2Yaml.java:548) ~[esv2yaml.jar:1.6.1]
at org.onehippo.cm.migration.Esv2Yaml.convert(Esv2Yaml.java:346) ~[esv2yaml.jar:1.6.1]
at org.onehippo.cm.migration.Esv2Yaml.main(Esv2Yaml.java:142) [esv2yaml.jar:1.6.1]
Exception in thread “main” org.onehippo.cm.migration.EsvParseException: Missing required property jcr:primaryType for node /hippo:configuration/hippo:frontend/cms/hst-folder-views at /Users/jean.mccallum/work12-upgrade/dhihippo/repository-data/application/src/main/resources/configuration/frontend/cms.xml [8,56]
at org.onehippo.cm.migration.SourceInitializeInstruction.processNode(SourceInitializeInstruction.java:323)
at org.onehippo.cm.migration.SourceInitializeInstruction.processNode(SourceInitializeInstruction.java:396)
at org.onehippo.cm.migration.SourceInitializeInstruction.processSource(SourceInitializeInstruction.java:182)
at org.onehippo.cm.migration.Esv2Yaml.processInitializeInstructions(Esv2Yaml.java:548)
at org.onehippo.cm.migration.Esv2Yaml.convert(Esv2Yaml.java:346)
at org.onehippo.cm.migration.Esv2Yaml.main(Esv2Yaml.java:142)

The cms.xml file looks like this:
<sv:node xmlns:sv=“http://www.jcp.org/jcr/sv/1.0” xmlns:esv=“http://www.onehippo.org/jcr/xmlimport” sv:name=“cms” esv:merge=“combine”>
<sv:node sv:name=“hst-folder-views” esv:merge=“skip”>
<sv:node sv:name=“hst:components” esv:merge=“combine”>
<sv:property sv:name=“list.page.size” sv:type=“String” esv:merge=“override”>
sv:value20</sv:value>
</sv:property>
</sv:node>
</sv:node>
:
:
:

Can someone help me understand which primaryType that should be used for this node?
Thanks

NOTE: I tried setting the jcr:primaryType to frontend:clusterfolder and this allowed the conversion to pass. I’m just not sure it’s the right type.

Hi,
/hippo:configuration/hippo:frontend/cms/hst-folder-views is unknown to me, is that a customization? Anyway please set the primary type to what is in some existing environment, it could very well be frontend:plugincluster

HTH
Jeroen

Thank you for your help. Setting a primaryType got rid of the error. I just hope I used the right one.

Thanks again.

Hi Jean,

The hst-folder-views node is bootstrapped by the HST configuration editor. It’s primary type is “frontend:clusterfolder”. Link to the source: https://code.onehippo.org/cms-community/hippo-addon-hst-configuration-editor/blob/master/repository/src/main/resources/hcm-config/hst-folder-views.yaml#L3-4

Note that the HST configuration editor has been removed in version 12, so better phase it out in your project.

best,

Mathijs

1 Like

Thank you for your help.
Jean mc