Hi Community,
I am trying to change the supertype of all our document types. Normally, ‘myproject:basedocument’ as the default supertype in a project. The supertype that we have in our project is ‘myproject:baseDocument’ (notice the captial ‘D’, renamed from ‘myproject:basedocument’). Due to this change the creation of a new document type using the cms interface is not possible. Attempting to do so results in the following error
An error has occurred, sorry for that.
java.lang.IllegalStateException: Could not resolve type myproject:basedocument
Failed to instantiate plugin class 'org.hippoecm.frontend.editor.builder.TemplateTypeEditorPlugin' for wicket id 'home.cluster.cms-static.plugin.servicesLoader.cluster.cms-services.plugin.defaultEditorFactory.cluster.cms-preview0.plugin.viewerPlugin.cluster._default_.form' in plugin 'home.cluster.cms-static.plugin.servicesLoader.cluster.cms-services.plugin.defaultEditorFactory.cluster.cms-preview0.plugin.viewerPlugin.cluster._default_.plugin.preview' (JcrPluginConfig:/hippo:namespaces/hipposysedit/templatetype/editor:templates/_default_/preview)
I have tried to fix this problem by introducing a new supertype ‘myproject:basedocument’ and manually replacing the supertypes in CND to the newly introduced supertype and running an updater on the existing content to effect the change. It works partially as I am now able to create new document types using the cms interface but at the server startup I get the this exception.
javax.jcr.RepositoryException: The following node type change contains non-trivial changes.Up until now only trivial changes are supported. (see javadoc for org.apache.jackrabbit.spi.commons.nodetype.NodeTypeDefDiff):
org.hippoecm.repository.jackrabbit.HippoNodeTypeRegistry$CustomNodeTypeDefDiff[
nodeTypeName={http://www.onehippo.org/myproject/nt/1.0}XYZ,
mixinFlagDiff=NONE,
supertypesDiff=MAJOR,
propertyDifferences=[
],
childNodeDifferences=[
]
]
Here XYZ is our internal document which extends from ‘myproject:baseDocument’. Due to this error the CND in the repository is not affected with the changes in CND file.
Is there a better and cleaner way of achieving this? Maybe adding ‘myproject:baseDocument’ as a default super type?
Any help is appreciated.
Kind Regards
Mehul Parmar
PS: If I throw away the repository and start afresh then the server starts as expected and no errors are encountered during the startup.