Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Any harm in missing namespaces?

Avatar

Avatar
Boost 3
Level 1
tim_funk
Level 1

Likes

3 likes

Total Posts

18 posts

Correct Reply

0 solutions
Top badges earned
Boost 3
Contributor
Applaud 5
Shape 1
Boost 1
View profile

Avatar
Boost 3
Level 1
tim_funk
Level 1

Likes

3 likes

Total Posts

18 posts

Correct Reply

0 solutions
Top badges earned
Boost 3
Contributor
Applaud 5
Shape 1
Boost 1
View profile
tim_funk
Level 1

11-03-2020

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?

 

 

 

 

 

namespace package

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,114 likes

Total Posts

3,148 posts

Correct Reply

1,072 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,114 likes

Total Posts

3,148 posts

Correct Reply

1,072 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile
Jörg_Hoh
Employee

13-03-2020

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...

Answers (0)