Hi all,

I have got an issue with the automatic registration of node type definitions
implemented in Sling. The problem shows up only if I stop and then restart
the servlet container (I am using Jetty Hightide in this case). After a
restart cycle, every time I re-deploy my node type definitions (along with
my bundle) I get the following exception:


org.apache.sling.jcr.base.internal.loader.Loader Stacktrace
 javax.jcr.RepositoryException: The following nodetype change contains
non-trivial changes.Up until now only trivial changes are supported. (see
javadoc for org.apache.jackrabbit.core.nodetype.NodeTypeDefDiff):
org.apache.jackrabbit.core.nodetype.NodeTypeDefDiff[
nodeTypeName={http://www.mynamespace.com}Album,
 mixinFlagDiff=NONE,
supertypesDiff=NONE,
propertyDifferences=[
 org.apache.jackrabbit.core.nodetype.NodeTypeDefDiff$PropDefDiff[itemName={
http://sling.apache.org/jcr/sling/1.0}resourceType, type=TRIVIAL,
operation=MODIFIED],
 ],
childNodeDifferences=[
org.apache.jackrabbit.core.nodetype.NodeTypeDefDiff$ChildNodeDefDiff[itemName={}images,
type=MAJOR, operation=REMOVED],
 
org.apache.jackrabbit.core.nodetype.NodeTypeDefDiff$ChildNodeDefDiff[itemName={}images,
type=TRIVIAL, operation=ADDED]
]
]

at
org.apache.jackrabbit.core.nodetype.NodeTypeRegistry.reregisterNodeType(NodeTypeRegistry.java:443)
at
org.apache.jackrabbit.core.nodetype.NodeTypeRegistry.reregisterNodeType(NodeTypeRegistry.java:364)
 at
org.apache.jackrabbit.core.nodetype.NodeTypeManagerImpl.registerNodeTypes(NodeTypeManagerImpl.java:591)
at
org.apache.jackrabbit.commons.cnd.CndImporter.registerNodeTypes(CndImporter.java:118)
 at
org.apache.sling.jcr.base.NodeTypeLoader.registerNodeType(NodeTypeLoader.java:124)
at
org.apache.sling.jcr.base.internal.loader.Loader.registerNodeTypes(Loader.java:218)
 at
org.apache.sling.jcr.base.internal.loader.Loader.registerBundleInternal(Loader.java:159)
at
org.apache.sling.jcr.base.internal.loader.Loader.registerBundle(Loader.java:89)
 at
org.apache.sling.jcr.base.internal.loader.Loader.updateBundle(Loader.java:116)
at
org.apache.sling.jcr.base.AbstractSlingRepository.bundleChanged(AbstractSlingRepository.java:595)
 at
org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:800)
at
org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:728)
 at
org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:610)
at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:3734)
 at org.apache.felix.framework.Felix.updateBundle(Felix.java:2065)
at org.apache.felix.framework.BundleImpl.update(BundleImpl.java:923)
 at
org.apache.felix.webconsole.internal.core.UpdateHelper.doRun(UpdateHelper.java:60)
at
org.apache.felix.webconsole.internal.core.BaseUpdateInstallHelper.doRun(BaseUpdateInstallHelper.java:89)
 at
org.apache.felix.webconsole.internal.core.UpdateHelper.doRun(UpdateHelper.java:70)
at
org.apache.felix.webconsole.internal.core.BaseUpdateInstallHelper.run(BaseUpdateInstallHelper.java:121)
 at java.lang.Thread.run(Unknown Source)



Note that I am not modifying the node types in any way, and the issue does
not happen until I restart the servlet container. Note also that the
container gracefully shutdown without any warning or error.
For reference the content of types.cnd is the following:


<myns = 'http://www.mynamespace.com'>

[myns:BaseType] > mix:versionable, mix:lockable, nt:unstructured
  mixin

[myns:Album] > myns:BaseType
  - sling:resourceType (string) = 'myns/album' copy autocreated
 + images = nt:unstructured version autocreated



Any idea about why the "images" child should be flagged as removed and added
again even if the types.cnd has not actually changed?

Thanks,

Davide

Reply via email to