Expand my Community achievements bar.

SOLVED

Any harm in missing namespaces?

Avatar

Level 4

I'm working on building AEM from a clean install. (for an upgrade)

 

I'm using crx2oak to copy the old repository to the new one. All has worked great so far until today when i wanted to build a package and ran into this "javax.jcr.NamespaceException: Unknown namespace prefix" exactly like this:

https://experienceleaguecommunities.adobe.com/t5/Adobe-Experience-Manager/Error-while-build-the-pack...

 

Which was nicely fixed by this:

https://helpx.adobe.com/experience-manager/kb/javax-jcr-NamespaceException-Unknown-namespace-prefix-...

 

So my question? I checked my old vs new environment and found many more missing namespaces. Aside from not being able to create a package - what other issues are lurking out there. It appears I can kind of script the insertion via curl by something like this:

 

curl -X POST -u $CREDENTIALS -F Callback=reload -F NewPrefix=exifEX -F NewURI=http://cipa.jp/exif/1.0/ "http://$AUTHOR:4502/crx/explorer/ui/namespace_editor.jsp?ck=1583942759354&Path='

 

 

But before I got though that effort, is it worth it?

 

 

 

 

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

crx2oak cannot handle namespaces, as indicated by [1]. But content-packages do.

 

So I could imagine a way, that you prime your new repo with some content-packages, which are mainly used to deploy some assets (most likely the namespaces originate from assets) into the new repo. Then migrate the content via crx2oak.

 

A different approach could be to use sling repoinit [2] to create all JCR namespaces in the new instance before you run crx2oak. You can write some code to export all existing JCR namespaces in the repoinit language and feed this as part of an OSGI configuration into the new instance, and then run crx2oak afterwards. Probably more reliable than the packaging approach above.

 

regards,

Jörg

 

 

[1] https://helpx.adobe.com/experience-manager/kb/javax-jcr-NamespaceException-Unknown-namespace-prefix-...

[2] https://sling.apache.org/documentation/bundles/repository-initialization.html#the-repoinit-repositor...

View solution in original post

1 Reply

Avatar

Correct answer by
Employee Advisor

crx2oak cannot handle namespaces, as indicated by [1]. But content-packages do.

 

So I could imagine a way, that you prime your new repo with some content-packages, which are mainly used to deploy some assets (most likely the namespaces originate from assets) into the new repo. Then migrate the content via crx2oak.

 

A different approach could be to use sling repoinit [2] to create all JCR namespaces in the new instance before you run crx2oak. You can write some code to export all existing JCR namespaces in the repoinit language and feed this as part of an OSGI configuration into the new instance, and then run crx2oak afterwards. Probably more reliable than the packaging approach above.

 

regards,

Jörg

 

 

[1] https://helpx.adobe.com/experience-manager/kb/javax-jcr-NamespaceException-Unknown-namespace-prefix-...

[2] https://sling.apache.org/documentation/bundles/repository-initialization.html#the-repoinit-repositor...