javax.jcr.NamespaceException: Unknown namespace prefix error in AEM

Description

The error below appears in the logs:

javax.jcr.NamespaceException: Unknown namespace prefix: namespacename
Could not Build Package "Unknown namespace prefix: namespacename

Environment

AEM

Cause

This error usually shows up in environments where partial data migration was done using the crx2oak tool.  The crx2oak tool doesn’t support migrating namespaces with the data.

Resolution

  1. Register the missing namespaces via the CRX Explorer:
  2. Go to http://hostname:port/crx/explorer/index.jsp and log in as admin user.
  3. Click Node Type Administration in the CRX Explorer.
  4. In the Node Type Administration window, click Namespaces, which is at far right of the toolbar.

rtaimage
5. At the bottom of the Namespaces window, click New.
6. Enter the URI and the Namespace mapping then click OK.
7. Enter the prefix of the Namespace mapping then click OK.

On this page

Adobe Summit Banner

A virtual event April 27-28.

Expand your skills and get inspired.

Register for free
Adobe Summit Banner

A virtual event April 27-28.

Expand your skills and get inspired.

Register for free
Adobe Maker Awards Banner

Time to shine!

Apply now for the 2021 Adobe Experience Maker Awards.

Apply now
Adobe Maker Awards Banner

Time to shine!

Apply now for the 2021 Adobe Experience Maker Awards.

Apply now