AEM package upload fails due to invalid property name in .content.xml
This article explains how to resolve an error encountered during Adobe Experience Manager (AEM) package upload when a property name in .content.xml doesn’t conform to XML QName standards.
Description description
Environment
Adobe Experience Manager (AEM), all versions
Symptoms
When uploading a package containing a PDF asset, the upload fails if the asset’s .content.xml includes a property name that begins with a number (For example: dc:4uSync). The following error appears in the logs:
org.apache.jackrabbit.vault.fs.io.DocViewParser$XmlParseException: Element or attribute "dc:4uSync" do not match QName production: QName::=(NCName:)?NCName.
The package upload fails, and the asset isn’t imported.
Cause
The error occurs because XML QName syntax doesn’t allow element or attribute names to begin with a digit. AEM’s package importer enforces this standard, resulting in a parsing failure when invalid property names are present.
Resolution resolution
Follow the steps below to resolve the issue:
- Open the
.content.xmlfile for the affected asset. - Locate any property names that begin with a number (For example:
dc:4uSync). - Rename the property so it starts with a letter, following XML QName standards (For example: change
dc:4uSynctodc:uSync4). - Save the changes and repackage the content.
- Retry the package upload using AEM Package Manager.
Verify that the package uploads successfully and that the asset is imported.