Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Malformed XML in React/latest ui.content #25

Open
actinium15 opened this issue Jul 12, 2021 · 4 comments
Open

Malformed XML in React/latest ui.content #25

actinium15 opened this issue Jul 12, 2021 · 4 comments

Comments

@actinium15
Copy link

.content.xml at [0] is malformed [1] and causes AEM to report errors like [2] when content-package built from the said branch is imported.

[0] https://github.com/adobe/aem-guides-wknd-spa/blob/React/latest/ui.content/src/main/content/jcr_root/conf/wknd-spa-react/settings/wcm/template-types/spa-page/initial/.content.xml
[1]

# xmllint --noout ~/Downloads/.content.xml 
/Users/ashishc/Downloads/.content.xml:2: parser error : XML declaration allowed only at the start of the document
<?xml version="1.0" encoding="UTF-8"?>
     ^

[2]

12.07.2021 14:17:21.596 *ERROR* [qtp503299301-93] org.apache.jackrabbit.vault.fs.impl.io.GenericArtifactHandler Error while parsing /jcr_root/conf/wknd-spa-react/settings/wcm/template-types/spa-page/initial/.content.xml: {}
org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.
    at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:204)
    at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:178)
    at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400)
    at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
    at java.xml/com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1471)
    at java.xml/com.sun.org.apache.xerces.internal.impl.XMLScanner.scanPIData(XMLScanner.java:745)
    at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanPIData(XMLDocumentFragmentScannerImpl.java:1049)
    at java.xml/com.sun.org.apache.xerces.internal.impl.XMLScanner.scanPI(XMLScanner.java:713)
    at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:891)
    at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:605)
    at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
    at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:534)
    at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:888)
    at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:824)
    at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
    at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1216)
    at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:635)
    at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:324)
    at org.apache.jackrabbit.vault.fs.impl.io.GenericArtifactHandler.accept(GenericArtifactHandler.java:100) [org.apache.jackrabbit.vault:3.4.0]
    at org.apache.jackrabbit.vault.fs.io.Importer.commit(Importer.java:932) [org.apache.jackrabbit.vault:3.4.0]
    at org.apache.jackrabbit.vault.fs.io.Importer.commit(Importer.java:799) [org.apache.jackrabbit.vault:3.4.0]
    at org.apache.jackrabbit.vault.fs.io.Importer.commit(Importer.java:839) [org.apache.jackrabbit.vault:3.4.0]
    at org.apache.jackrabbit.vault.fs.io.Importer.commit(Importer.java:839) [org.apache.jackrabbit.vault:3.4.0]
    at org.apache.jackrabbit.vault.fs.io.Importer.commit(Importer.java:839) [org.apache.jackrabbit.vault:3.4.0]
    at org.apache.jackrabbit.vault.fs.io.Importer.commit(Importer.java:839) [org.apache.jackrabbit.vault:3.4.0]
    at org.apache.jackrabbit.vault.fs.io.Importer.commit(Importer.java:839) [org.apache.jackrabbit.vault:3.4.0]
    at org.apache.jackrabbit.vault.fs.io.Importer.commit(Importer.java:839) [org.apache.jackrabbit.vault:3.4.0]
    at org.apache.jackrabbit.vault.fs.io.Importer.commit(Importer.java:839) [org.apache.jackrabbit.vault:3.4.0]
    at org.apache.jackrabbit.vault.fs.io.Importer.run(Importer.java:440) [org.apache.jackrabbit.vault:3.4.0]
    at org.apache.jackrabbit.vault.packaging.impl.ZipVaultPackage.extract(ZipVaultPackage.java:232) [org.apache.jackrabbit.vault:3.4.0]
    at org.apache.jackrabbit.vault.packaging.impl.JcrPackageImpl.extract(JcrPackageImpl.java:401) [org.apache.jackrabbit.vault:3.4.0]
    at org.apache.jackrabbit.vault.packaging.impl.JcrPackageImpl.extract(JcrPackageImpl.java:360) [org.apache.jackrabbit.vault:3.4.0]12.07.2021 14:17:21.596 *ERROR* [qtp503299301-93] org.apache.jackrabbit.vault.fs.impl.io.GenericArtifactHandler Error while parsing /jcr_root/conf/wknd-spa-react/settings/wcm/template-types/spa-page/initial/.content.xml: {}
org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.
    at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:204)
    at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:178)
    at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400)
    ...
    at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:324)
    at org.apache.jackrabbit.vault.fs.impl.io.GenericArtifactHandler.accept(GenericArtifactHandler.java:100) [org.apache.jackrabbit.vault:3.4.0]
    at org.apache.jackrabbit.vault.fs.io.Importer.commit(Importer.java:932) [org.apache.jackrabbit.vault:3.4.0]
    at org.apache.jackrabbit.vault.fs.io.Importer.commit(Importer.java:799) [org.apache.jackrabbit.vault:3.4.0]
    at org.apache.jackrabbit.vault.fs.io.Importer.commit(Importer.java:839) [org.apache.jackrabbit.vault:3.4.0]
    at org.apache.jackrabbit.vault.fs.io.Importer.commit(Importer.java:839) [org.apache.jackrabbit.vault:3.4.0]
    at org.apache.jackrabbit.vault.fs.io.Importer.commit(Importer.java:839) [org.apache.jackrabbit.vault:3.4.0]
    at org.apache.jackrabbit.vault.fs.io.Importer.commit(Importer.java:839) [org.apache.jackrabbit.vault:3.4.0]
    at org.apache.jackrabbit.vault.fs.io.Importer.commit(Importer.java:839) [org.apache.jackrabbit.vault:3.4.0]
    at org.apache.jackrabbit.vault.fs.io.Importer.commit(Importer.java:839) [org.apache.jackrabbit.vault:3.4.0]
    at org.apache.jackrabbit.vault.fs.io.Importer.commit(Importer.java:839) [org.apache.jackrabbit.vault:3.4.0]
    at org.apache.jackrabbit.vault.fs.io.Importer.run(Importer.java:440) [org.apache.jackrabbit.vault:3.4.0]
    at org.apache.jackrabbit.vault.packaging.impl.ZipVaultPackage.extract(ZipVaultPackage.java:232) [org.apache.jackrabbit.vault:3.4.0]
    at org.apache.jackrabbit.vault.packaging.impl.JcrPackageImpl.extract(JcrPackageImpl.java:401) [org.apache.jackrabbit.vault:3.4.0]
    at org.apache.jackrabbit.vault.packaging.impl.JcrPackageImpl.extract(JcrPackageImpl.java:360) [org.apache.jackrabbit.vault:3.4.0]
    at org.apache.jackrabbit.vault.packaging.impl.JcrPackageImpl.install(JcrPackageImpl.java:354) [org.apache.jackrabbit.vault:3.4.0]
    at com.day.crx.packaging.impl.J2EEPackageManager.consoleInstall(J2EEPackageManager.java:361) [com.adobe.granite.crx-packagemgr:1.2.108]
    at com.day.crx.packaging.impl.J2EEPackageManager.doPost(J2EEPackageManager.java:203) [com.adobe.granite.crx-packagemgr:1.2.108]
    at com.day.crx.packaging.impl.PackageManagerServlet.doPost(PackageManagerServlet.java:169) [com.adobe.granite.crx-packagemgr:1.2.108]
    ...
12.07.2021 14:17:21.598 *ERROR* [qtp503299301-93] org.apache.jackrabbit.vault.fs.io.Importer E /conf/wknd-spa-react/settings/wcm/template-types/spa-page/initial (org.xml.sax.SAXParseException; systemId: file:///jcr_root/conf/wknd-spa-react/settings/wcm/template-types/spa-page/initial/.content.xml; lineNumber: 2; columnNumber: 6; The processing instruction target matching "[xX][mM][lL]" is not allowed.)
12.07.2021 14:17:22.793 *ERROR* [qtp503299301-93] org.apache.jackrabbit.vault.fs.io.Importer There were errors during package install. Please check the logs for details.
12.07.2021 14:17:22.835 *INFO* [qtp503299301-93] org.apache.jackrabbit.vault.packaging.impl.ActivityLog com.adobe.aem.guides:wknd-spa-react.ui.content:1.0.3-SNAPSHOT: INSTALL
actinium15 added a commit to actinium15/aem-guides-wknd-spa that referenced this issue Jul 12, 2021
@actinium15
Copy link
Author

changeset to fix the issue: React/latest...actinium15:issue/malformedXML

@actinium15
Copy link
Author

@godanny86, could you please have a look?

@actinium15
Copy link
Author

thanks for merging the PR @davidjgonzalez!

a command like [0] indicates that there are other branches affected by this issue - would they need a patch similar to #26?

[0]

git remote show origin | grep React/ | grep tracked | awk '{print $1}' | xargs -Ibranch bash -c "echo branch; git show origin/branch:ui.content/src/main/content/jcr_root/conf/wknd-spa-react/settings/wcm/template-types/spa-page/initial/.content.xml"

@davidjgonzalez
Copy link

If you wouldn't mind that would be great!!

This was referenced Jul 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants