Over the time some new meta tags found the way into some programs which can edit media files. When some files added to AEM, the creation process for packages breaks with a javax.jcr.NamespaceException. I found https://experienceleague.adobe.com/docs/experience-cloud-kcs/kbarticles/KA-16465.html?lang=en to add the missing namespaces manually.
My question: In case the instance has to be renewed, how can be the missing names provided during package installation?
Thanks in advanced
Solved! Go to Solution.
Views
Replies
Total Likes
Could you please explore via CND File as described at https://techrevel.blog/2020/01/23/aem-custom-namespace/
The CND File way has a advantage, that the namespace will be automatically registered on deploying code.
Create a nodetypes.cnd at the location /src/main/content/META-INF/vault/nodetypes.cnd
Register you namespace as shown in the example below
<'sling'='http://sling.apache.org/jcr/sling/1.0'>
<'nt'='http://www.jcp.org/jcr/nt/1.0'>
<'techrevel'='http://www.techrevel.blog'>
[sling:Folder] > nt:folder
– * (undefined)
– * (undefined) multiple
+ * (nt:base) = sling:Folder version
Once you deploy the code, the namespace would be available for use.
I could see nodetypes.cnd is available at aem-demo\ui.frontend\node_modules\aemsync\data\package-content\META-INF\vault\nodetypes.cnd [my sample aem application]. Please check nodetypes.cnd in your project.
namespaces are getting stored under /jcr:system/rep:namespaces as shown below -
We could create a separate package for namespaces and install.
Hope it will help.
Could you please explore via CND File as described at https://techrevel.blog/2020/01/23/aem-custom-namespace/
The CND File way has a advantage, that the namespace will be automatically registered on deploying code.
Create a nodetypes.cnd at the location /src/main/content/META-INF/vault/nodetypes.cnd
Register you namespace as shown in the example below
<'sling'='http://sling.apache.org/jcr/sling/1.0'>
<'nt'='http://www.jcp.org/jcr/nt/1.0'>
<'techrevel'='http://www.techrevel.blog'>
[sling:Folder] > nt:folder
– * (undefined)
– * (undefined) multiple
+ * (nt:base) = sling:Folder version
Once you deploy the code, the namespace would be available for use.
I could see nodetypes.cnd is available at aem-demo\ui.frontend\node_modules\aemsync\data\package-content\META-INF\vault\nodetypes.cnd [my sample aem application]. Please check nodetypes.cnd in your project.
namespaces are getting stored under /jcr:system/rep:namespaces as shown below -
We could create a separate package for namespaces and install.
Hope it will help.
Thanks for your answer. I tried it out immeditly. I added the file to an existing package. During package building I get the error message "[ERROR] Request failed: java.lang.IllegalStateException: Archive not valid. (500)". What is wrong?
I could fix it. The file name is not correct. It must be "nodetype", the singular form. After correction it works like a charm.
Thanks a lot..
Great observation and thanks for your input. While exploring your requirement I have noticed nodetypes.cnd in my sample application and this file[named:nodetypes.cnd] was created during initial project setup.
On filesystem tin folder /content/META-INF/vault exists a file called settings.xml. In this you can find the name "nodetype".