Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-12785

Improve exception mesage when nodename contains "/"

    XMLWordPrintable

Details

    • Improvement
    • Status: Open
    • Low
    • Resolution: Unresolved
    • 5.0.1
    • None
    • repository
    • None

    Description

      This is not a bug, just an improvement suggestion.

      Current situation

      A yml file with the following definition ( which obviously is maldefined, because the nodename contains a relative path ):

      definitions:
        config:
          /hippo:configuration/hippo:workflows:
            /default/handle/hipposys:config:
              scxml-definition: documentworkflow-wpm
      
      Caused by: java.lang.IllegalStateException: Node '/hippo:configuration/hippo:workflows/default/handle/hipposys:config' defined at 'hippo-cms/hippo-addon-wpm/hippo-addon-wpm-repository-documentworkflow [config: wpm-workflows.yaml]' is missing the required jcr:primaryType property.
      INFO 	at org.onehippo.cm.model.impl.tree.ConfigurationTreeBuilder.requirePrimaryType(ConfigurationTreeBuilder.java:642) ~[hippo-configuration-management-model-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
      INFO 	at org.onehippo.cm.model.impl.tree.ConfigurationTreeBuilder.mergeNode(ConfigurationTreeBuilder.java:255) ~[hippo-configuration-management-model-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
      INFO 	at org.onehippo.cm.model.impl.tree.ConfigurationTreeBuilder.mergeNode(ConfigurationTreeBuilder.java:279) ~[hippo-configuration-management-model-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
      INFO 	at org.onehippo.cm.model.impl.tree.ConfigurationTreeBuilder.push(ConfigurationTreeBuilder.java:135) ~[hippo-configuration-management-model-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
      INFO 	at java.util.ArrayList.forEach(ArrayList.java:1249) ~[?:1.8.0_102]
      INFO 	at org.onehippo.cm.model.impl.ConfigurationModelImpl.buildConfiguration(ConfigurationModelImpl.java:235) ~[hippo-configuration-management-model-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
      INFO 	at org.onehippo.cm.model.impl.ConfigurationModelImpl.build(ConfigurationModelImpl.java:204) ~[hippo-configuration-management-model-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
      INFO 	at org.onehippo.cm.model.parser.ClasspathConfigurationModelReader.read(ClasspathConfigurationModelReader.java:88) ~[hippo-configuration-management-model-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
      INFO 	at org.onehippo.cm.model.parser.ClasspathConfigurationModelReader.read(ClasspathConfigurationModelReader.java:57) ~[hippo-configuration-management-model-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
      INFO 	at org.onehippo.cm.engine.ConfigurationServiceImpl.loadBootstrapModel(ConfigurationServiceImpl.java:512) ~[hippo-repository-engine-5.1.0-SNAPSHOT.jar:5.1.0-SNAPSHOT]
      INFO 	at org.onehippo.cm.engine.ConfigurationServiceImpl.init(ConfigurationServiceImpl.java:166) ~[hippo-repository-engine-5.1.0-SNAPSHOT.jar:5.1.0-SNAPSHOT]
      INFO 	at org.onehippo.cm.engine.ConfigurationServiceImpl.start(ConfigurationServiceImpl.java:124) ~[hippo-repository-engine-5.1.0-SNAPSHOT.jar:5.1.0-SNAPSHOT]
      INFO 	at org.hippoecm.repository.LocalHippoRepository.initializeConfiguration(LocalHippoRepository.java:276) ~[hippo-repository-engine-5.1.0-SNAPSHOT.jar:5.1.0-SNAPSHOT]
      INFO 	at org.hippoecm.repository.LocalHippoRepository.initialize(LocalHippoRepository.java:260) ~[hippo-repository-engine-5.1.0-SNAPSHOT.jar:5.1.0-SNAPSHOT]
      INFO 	at org.hippoecm.repository.LocalHippoRepository.create(LocalHippoRepository.java:113) ~[hippo-repository-engine-5.1.0-SNAPSHOT.jar:5.1.0-SNAPSHOT]
      INFO 	at org.hippoecm.repository.LocalHippoRepository.create(LocalHippoRepository.java:103) ~[hippo-repository-engine-5.1.0-SNAPSHOT.jar:5.1.0-SNAPSHOT]
      INFO 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_102]
      INFO 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_102]
      INFO 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_102]
      INFO 	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_102]
      INFO 	at org.hippoecm.repository.HippoRepositoryFactory.getHippoRepository(HippoRepositoryFactory.java:147) ~[hippo-repository-connector-5.1.0-SNAPSHOT.jar:5.1.0-SNAPSHOT]
      INFO 	... 17 more
      

      Desired

      An exception message indicating the child node ( /default/handle/hipposys:config in this case ) can only contain the node name, not a relative path.

      Attachments

        Activity

          People

            Unassigned Unassigned
            mrop Michiel Rop
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: