Pipeline build fails at mutable content installation step in AEMaaCS
In ÃÛ¶¹ÊÓÆµ Experience Manager as a Cloud Service (AEMaaCS), pipeline builds fail during the mutable content installation step due to an XML parsing error. The issue occurs when .content.xml
files contain improperly escaped &
characters. The parser throws an error stating; The entity name must immediately follow the &
in the entity reference. To resolve the issue, replace invalid &
characters and redeploy the pipeline.
Description description
Environment
- Product: ÃÛ¶¹ÊÓÆµ Experience Manager as a Cloud Service (AEMaaCS) – Sites
- Instance: Development
Issue/Symptoms
- Pipeline build fails during the mutable content installation step with the following error:
[ EventAdminAsyncThread #3] org.apache.sling.distribution.journal.impl.publisher.DistributionPublisher [ preview] Message: Failed attempt (8/infinite) to import the distribution package PackageMessage(pubSlingId=3dcea89e-adc8-4bc9-99ce-01daa28559e6, reqType=ADD, pkgId=dstrpck-1744800882270-db48d737-080d-4cf9-b099-d8abf6e75086, pkgType=journal_filevault, pkgLength=7591, pubAgentName=preview, userId=replication-service, paths=[ /etc/packages/<custom><package>/<package><name>.zip] , deepPaths=[ ] , metadata={}) at offset=17225106 because of 'Error trying to extract package at path /etc/packages/<custom><package>/<package><name>.zip because of 'org.apache.jackrabbit.vault.fs.io.DocViewParser$XmlParseException: The entity name must immediately follow the '&' in the entity reference.'', the importer will retry later,_Stacktrace: org.apache.sling.distribution.common.DistributionException: Error trying to extract package at path /etc/packages/<custom><package>/<package><name>.zip because of 'org.apache.jackrabbit.vault.fs.io.DocViewParser$XmlParseException: The entity name must immediately follow the '&' in the entity reference.'_ at org.apache.sling.distribution.journal.bookkeeper.ContentPackageExtractor.handlePath(ContentPackageExtractor.java:93)_ at org.apache.sling.distribution.journal.bookkeeper.ContentPackageExtractor.handle(ContentPackageExtractor.java:76)_ at org.apache.sling.distribution.journal.bookkeeper.PackageHandler.installAddPackage(PackageHandler.java:79)_ at org.apache.sling.distribution.journal.bookkeeper.PackageHandler.apply(PackageHandler.java:61)_ at org.apache.sling.distribution.journal.bookkeeper.BookKeeper.importPackage(BookKeeper.java:163)_ at org.apache.sling.distribution.journal.impl.subscriber.DistributionSubscriber.processQueueItem(DistributionSubscriber.java:395)_ at org.apache.sling.distribution.journal.impl.subscriber.DistributionSubscriber.fetchAndProcessQueueItem(DistributionSubscriber.java:346)_ at org.apache.sling.distribution.journal.impl.subscriber.DistributionSubscriber.processQueue(DistributionSubscriber.java:324)_ at java.base/java.lang.Thread.run(Thread.java:1583)_Caused by: javax.jcr.RepositoryException: org.apache.jackrabbit.vault.fs.io.DocViewParser$XmlParseException: The entity name must immediately follow the '&' in the entity reference._ at org.apache.jackrabbit.vault.fs.impl.io.AbstractArtifactHandler.importDocView(AbstractArtifactHandler.java:187)_ at org.apache.jackrabbit.vault.fs.impl.io.GenericArtifactHandler.accept(GenericArtifactHandler.java:88)_ at org.apache.jackrabbit.vault.fs.io.Importer.commit(Importer.java:1115)_ at org.apache.jackrabbit.vault.fs.io.Importer.commit(Importer.java:976)_ at org.apache.jackrabbit.vault.fs.io.Importer.commit(Importer.java:1018)_ at org.apache.jackrabbit.vault.fs.io.Importer.commit(Importer.java:1018)_ at org.apache.jackrabbit.vault.fs.io.Importer.commit(Importer.java:1018)_ at org.apache.jackrabbit.vault.fs.io.Importer.commit(Importer.java:1018)_ at org.apache.jackrabbit.vault.fs.io.Importer.commit(Importer.java:1018)_ at org.apache.jackrabbit.vault.fs.io.Importer.run(Importer.java:531)_ at org.apache.jackrabbit.vault.packaging.impl.ZipVaultPackage.extract(ZipVaultPackage.java:284)_ at org.apache.jackrabbit.vault.packaging.impl.JcrPackageImpl.extract(JcrPackageImpl.java:398)_ at org.apache.jackrabbit.vault.packaging.impl.JcrPackageImpl.extract(JcrPackageImpl.java:356)_ at org.apache.jackrabbit.vault.packaging.impl.JcrPackageImpl.extract(JcrPackageImpl.java:342)_ at org.apache.sling.distribution.journal.bookkeeper.ContentPackageExtractor.installPackage(ContentPackageExtractor.java:126)_ at org.apache.sling.distribution.journal.bookkeeper.ContentPackageExtractor.installPackage(ContentPackageExtractor.java:112)_ at org.apache.sling.distribution.journal.bookkeeper.ContentPackageExtractor.handlePath(ContentPackageExtractor.java:87)_ ... 8 more_Caused by: org.apache.jackrabbit.vault.fs.io.DocViewParser$XmlParseException: The entity name must immediately follow the '&' in the entity reference._ at org.apache.jackrabbit.vault.fs.io.DocViewParser.parse(DocViewParser.java:256)_ at org.apache.jackrabbit.vault.fs.impl.io.AbstractArtifactHandler.importDocView(AbstractArtifactHandler.java:177)_ ... 24 more_Caused by: org.xml.sax.SAXParseException; systemId: file:///path/to/file/.content.xml; lineNumber: 400; columnNumber: 36; The entity name must immediately follow the '&' in the entity reference._ at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:204)_ at
- XML parsing error occurs due to improperly escaped
&
characters in.content.xml
files. - Deployment queues become blocked, and the importer repeatedly retries package extraction.
Resolution resolution
To resolve the error, follow these steps:
- Open all
.content.xml
files included in the deployment package. - Search for any instance of the
&
character that is not properly escaped. - Replace each
&
with&
or the wordand
 to ensure valid XML. - Save the updated files and rebuild the deployment package.
recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f