cancel
Showing results for 
Search instead for 
Did you mean: 

'Type has no parent' exception on content model override

schipmolder
Champ on-the-rise
Champ on-the-rise
Hi,

I'm basically trying to override the 'autoVersionOnUpdateProps' property of the cm:versionable aspect just like in this post http://forums.alfresco.com/en/viewtopic.php?f=5&t=24603 but I keep getting an AlfrescoRuntimeException 'Type PSmiley Tongues:versionable has no parent!'
(my model uses namespace prefix ps)

Does anyone know what I'm doing wrong?

I'm running on 4.0b.

Thanks!


<aspect name="ps:versionable">
   <title>Versionable</title>
   <parent>cm:versionable</parent>
   <overrides>
      <property name="cm:autoVersionOnUpdateProps">
         <default>false</default>
      </property>
   </overrides>
</aspect>


org.alfresco.error.AlfrescoRuntimeException: 00170001 Type P:ps:versionable has no parent!
   at org.alfresco.opencmis.dictionary.PolicyTypeDefintionWrapper.connectParentAndSubTypes(PolicyTypeDefintionWrapper.java:103)
   at org.alfresco.opencmis.dictionary.CMISAbstractDictionaryService.init(CMISAbstractDictionaryService.java:351)
   at org.alfresco.opencmis.dictionary.CMISAbstractDictionaryService.afterDictionaryInit(CMISAbstractDictionaryService.java:400)
   at org.alfresco.opencmis.dictionary.CMISAbstractDictionaryService.onBootstrap(CMISAbstractDictionaryService.java:423)
   at org.springframework.extensions.surf.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:56)
   at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEventInternal(SafeApplicationEventMulticaster.java:209)
   at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:180)
   at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303)
   at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:911)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:428)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
   at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:63)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
   at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
   at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
   at org.apache.catalina.core.StandardService.start(StandardService.java:519)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
5 REPLIES 5

amandaluniz_z
Champ on-the-rise
Champ on-the-rise
You have a type defined which has no parent…. are you just adding the aspect in the custom content model?

Your other thread shows:



<mandatory-aspects>
<aspect>myModel:versionable</aspect>
</mandatory-aspects>
</type>
</types>

So I assume there's a type somewhere in your content model

schipmolder
Champ on-the-rise
Champ on-the-rise
Sorry, I'm not sure if I follow you.

I do have a type defined that uses this ps:versionable aspect as mandatory, but I also get this exception when i take that type out completely.

If I take the ps:versionable definition out of my model everything works as I want it to, except that it auto versions on property updates of course.
I've temporarily adjusted the default contentmodel.xml file which does the trick as well, but eventually I'd like to be able to override that setting if that makes sense.

amandaluniz_z
Champ on-the-rise
Champ on-the-rise
you're using it through cmis right?

For some reason it's taking the aspect as a type….

chalford
Champ in-the-making
Champ in-the-making
Worth noting, this is an issue with 4.0.0 that has been fixed in 4.0.1: https://issues.alfresco.com/jira/browse/ALF-12723.

paul_price
Champ in-the-making
Champ in-the-making
I'm trying to override the isContentIndexed attribute in child type (of cm:content). It's not going well for 2 reasons.
1) I could not find a good reference for doing an override to a parent type
2) catalina.out is not showing anything worth while. All I'm getting is
———–
Dec 9, 2013 11:47:35 AM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
———-

Question #1: Is there a different file I should be checking for errors, or a way to trigger better messages for content model problems?
Question #2: Is there a good example of overriding parent attributes in a child type? In particular, I want to turn off full-text indexing for my type, but another attribute would also be helpful.