Jahia Dev Forum > Extending a module...

0 (0 Good)
0 (0 Bad)

Extending a module resulting in an error. Need pointers.

by  abhinitb »  2013/04/05 09:23

Hi,

When I am trying to extend my module with another one, it sometimes results in an error when deployed on the server and restarting it. The exception generated is :

org.jahia.services.content.nodetypes.ParseException: Cannot validate supertypes for : jnt:latestarticle (/apps/tomcat/webapps/ROOT/modules/MEP_Latest_Article/META-INF/definitions.cnd, line 0, col 0)

at org.jahia.services.content.nodetypes.JahiaCndReader.parse(JahiaCndReader.java:320)
at org.jahia.services.content.nodetypes.NodeTypeRegistry.addDefinitionsFile(NodeTypeRegistry.java:117)
at org.jahia.services.templates.TemplatePackageRegistry.register(TemplatePackageRegistry.java:452)
at org.jahia.services.templates.TemplatePackageDeployer.registerTemplatePackages(TemplatePackageDeployer.java:339)
at org.jahia.services.templates.JahiaTemplateManagerService.start(JahiaTemplateManagerService.java:408)
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.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1544)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1485)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1325)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1086)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
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.apache.pluto.driver.PortalStartupListener.contextInitialized(PortalStartupListener.java:108)
at org.jahia.bin.listeners.JahiaContextLoaderListener.contextInitialized(JahiaContextLoaderListener.java:164)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:675)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:601)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
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)
Caused by: javax.jcr.nodetype.NoSuchNodeTypeException: jnt:meplatestcarousel
at org.jahia.services.content.nodetypes.NodeTypeRegistry.getNodeType(NodeTypeRegistry.java:149)
at org.jahia.services.content.nodetypes.ExtendedNodeType.validate(ExtendedNodeType.java:267)
at org.jahia.services.content.nodetypes.JahiaCndReader.parse(JahiaCndReader.java:310)
... 59 more
 
The definitons.cnd has the below declaration : 
[jnt:latestarticle] > jnt:content, jnt:meplatestcarousel, mix:title, jmix:mepModules, jmix:editorialContent, jmix:mepHomeCarouselQuery
 
The jnt:latestarticle is being extended by jnt:meplatestcarousel here.
 
The main issue is that this error is inconsistent. Sometimes the module works fine and is being properly extended as I can see the input fields mentioned in the supertype module showing appropriately in the engine of the child module.
 
Has anyone faced any such error ? Can someone provide any pointers on this.
 
Best Regards,
Abhinit
 
  • Extending a module resulting in an error. Need pointers.
    2013/04/05 09:25

    abhinitb <p> Hi,</p> <p> When I am trying to extend my module with another one, it sometimes results in an error when deployed on the server and restarting it. The exception generated is :</p> <p> org.jahia.services.content.nodetypes.ParseException: Cannot validate supertypes for : jnt:latestarticle (/apps/tomcat/webapps/ROOT/modules/MEP_Latest_Article/META-INF/definitions.cnd, line 0, col 0)</p> <div> <div> at org.jahia.services.content.nodetypes.JahiaCndReader.parse(JahiaCndReader.java:320)</div> <div> at org.jahia.services.content.nodetypes.NodeTypeRegistry.addDefinitionsFile(NodeTypeRegistry.java:117)</div> <div> at org.jahia.services.templates.TemplatePackageRegistry.register(TemplatePackageRegistry.java:452)</div> <div> at org.jahia.services.templates.TemplatePackageDeployer.registerTemplatePackages(TemplatePackageDeployer.java:339)</div> <div> at org.jahia.services.templates.JahiaTemplateManagerService.start(JahiaTemplateManagerService.java:408)</div> <div> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</div> <div> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)</div> <div> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)</div> <div> at java.lang.reflect.Method.invoke(Method.java:597)</div> <div> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1544)</div> <div> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1485)</div> <div> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)</div> <div> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)</div> <div> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)</div> <div> at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)</div> <div> at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)</div> <div> at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)</div> <div> at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)</div> <div> at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)</div> <div> at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)</div> <div> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1325)</div> <div> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1086)</div> <div> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)</div> <div> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)</div> <div> at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)</div> <div> at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)</div> <div> at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)</div> <div> at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)</div> <div> at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)</div> <div> at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)</div> <div> at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)</div> <div> at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)</div> <div> at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)</div> <div> at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)</div> <div> at org.apache.pluto.driver.PortalStartupListener.contextInitialized(PortalStartupListener.java:108)</div> <div> at org.jahia.bin.listeners.JahiaContextLoaderListener.contextInitialized(JahiaContextLoaderListener.java:164)</div> <div> at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)</div> <div> at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)</div> <div> at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)</div> <div> at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)</div> <div> at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)</div> <div> at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:675)</div> <div> at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:601)</div> <div> at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)</div> <div> at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)</div> <div> at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)</div> <div> at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)</div> <div> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)</div> <div> at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)</div> <div> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)</div> <div> at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)</div> <div> at org.apache.catalina.core.StandardService.start(StandardService.java:525)</div> <div> at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)</div> <div> at org.apache.catalina.startup.Catalina.start(Catalina.java:595)</div> <div> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</div> <div> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)</div> <div> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)</div> <div> at java.lang.reflect.Method.invoke(Method.java:597)</div> <div> at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)</div> <div> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)</div> <div> Caused by: javax.jcr.nodetype.NoSuchNodeTypeException: jnt:meplatestcarousel</div> <div> at org.jahia.services.content.nodetypes.NodeTypeRegistry.getNodeType(NodeTypeRegistry.java:149)</div> <div> at org.jahia.services.content.nodetypes.ExtendedNodeType.validate(ExtendedNodeType.java:267)</div> <div> at org.jahia.services.content.nodetypes.JahiaCndReader.parse(JahiaCndReader.java:310)</div> <div> ... 59 more</div> </div> <div> &nbsp;</div> <div> The definitons.cnd has the below declaration :&nbsp;</div> <div> [jnt:latestarticle] &gt; jnt:content, jnt:meplatestcarousel, mix:title, jmix:mepModules, jmix:editorialContent, jmix:mepHomeCarouselQuery</div> <div> &nbsp;</div> <div> The jnt:latestarticle is being extended by&nbsp;jnt:meplatestcarousel here.</div> <div> &nbsp;</div> <div> The main issue is that this error is inconsistent. Sometimes the module works fine and is being properly extended as I can see the input fields mentioned in the supertype module showing appropriately in the engine of the child module.</div> <div> &nbsp;</div> <div> Has anyone faced any such error ? Can someone provide any pointers on this.</div> <div> &nbsp;</div> <div> Best Regards,</div> <div> Abhinit</div> <div> &nbsp;</div>

  • Number of messages  28
    Registration date Apr 5, 2013
    0 (0 Good)
    0 (0 Bad)

    Re: Extending a module resulting in an error. Need pointers.

    by  rvt »  2013/04/16 21:57

    This definition is oncorrect:
    [jnt:latestarticle] > jnt:content, jnt:meplatestcarousel, mix:title, jmix:mepModules, jmix:editorialContent, jmix:mepHomeCarouselQuery

    You can only have one jnt but multiple mixing types.

    You properly need something like this:
    [jnt:latestarticle] > jnt:meplatestcarousel, mix:title, jmix:mepModules, jmix:editorialContent, jmix:mepHomeCarouselQuery

    Only a single parent is allowed, but several parent mixins can be set.

    You might want to re-review your CND file, also based on your other post in teh forum.

    Ries
    www.riesvantwisk.com

  • Re: Extending a module resulting in an error. Need pointers.
    2013/04/16 21:57

    rvt <p> This definition is oncorrect:<br /> <span style="color: rgb(51, 51, 51); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px; ">[jnt:latestarticle] &gt; jnt:content, <strong>jnt:meplatestcarousel</strong>, mix:title, jmix:mepModules, jmix:editorialContent, jmix:mepHomeCarouselQuery</span></p> <p> You can only have <strong>one</strong> jnt but multiple mixing types.</p> <p> You properly need something like this:<br /> <strong><span style="color: rgb(51, 51, 51); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px; ">[jnt:latestarticle] &gt; jnt:meplatestcarousel, mix:title, jmix:mepModules, jmix:editorialContent, jmix:mepHomeCarouselQuery</span></strong></p> <p> Only a single parent is allowed, but several parent mixins can be set.</p> <p> You might want to re-review your CND file, also based on your other post in teh forum.</p> <p> Ries<br /> www.riesvantwisk.com</p>

  • Number of messages  185
    Registration date Apr 16, 2013
    0 (0 Good)
    0 (0 Bad)

    Re: Re: Extending a module resulting in an error. Need pointers.

    by  abhinitb »  2013/04/17 12:48

    Thanks Ries..

    I will modify the CND accordingly.

     

    Best Regards,

    Abhinit

  • Re: Re: Extending a module resulting in an error. Need pointers.
    2013/04/17 12:48

    abhinitb <p> Thanks Ries..</p> <p> I will modify the CND accordingly.</p> <p> &nbsp;</p> <p> Best Regards,</p> <p> Abhinit</p>

  • Number of messages  28
    Registration date Apr 17, 2013
    Contact
    Share
    Feedback

    Get in touch

    Whether you are a current user or if you are just evaluating Jahia, we are here to help.

    Contact us

    Share this page