Expand my Community achievements bar.

Custom Namspace will not install from CND File

Avatar

Level 2

I am trying to add a custom namespace definition to my AEM 5.6.1 server through a .CND file which is in my content package maven project. I have not figured out why the CND file does not install. When I run the maven build for the project everything gets installed except the .cnd file. I double check the error.log and manually install the package using the package manager, the "Installing node types..." section in the package installer output is always empty. It appears to be seeing the file since if I make a syntax error in the file (for example using  /> to end the tag instead of just >) I get an error in the error.log.

I read some helpful information in an old thread but I did not want to dredge that up. I will link it here https://groups.google.com/d/topic/day-communique/z1nH5ajC0Ew/discussion

Also there is a related article on the adobe blog that gives a few lines at the end on this topic but nothing specific http://blogs.adobe.com/contentmanagement/2012/11/21/how-to-add-custom-namespace-in-crx/

I have tried the following paths:

/apps/company/nodetypes/company.cnd
/apps/company/nodetypes/nodetypes.cnd
/apps/dam/nodetypes/company.cnd
/apps/dam/nodetypes/nodetypes.cnd

In the actual file I have just one line, the following (I have tried with the prefix "company" in single quotes or without and the URI with the trailing slash and without.)

    <company='http://company_cq.company.com/nt/1.0/'>

In my filter.xml file I have the both paths listed, e.g.

    <filter root="/apps/company" />
    <filter root="/apps/dam" />

I am baffled. Anyone know what I am missing?

-David
 

UPDATE:

I tried adding a custom node type to my .CND file and that seems to work, but I don't understand why that would be necessary when everything I have read says that is not necessary.

<'cq'='http://www.day.com/jcr/cq/1.0'>
<'company'='http://company_cq.company.com/nt/1.0'>

[company:Taggable] > cq:Taggable
  mixin
  - * (undefined)

2 Replies

Avatar

Level 10

Did that workaround solve your issue? 

Avatar

Level 2

It appears that if I define the namespace with a node type using that namespace prefix then it will install the CND file contents, however if you only define a namespace then it will ignore it. I really don't want to define a node type. Its bad enough that I have to define a namespace.