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:
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:
crx2oak cannot handle namespaces, as indicated by . 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  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.