Skip to main content
Level 2
Oct 16, 2015 2:29 AM UTC
Solved

"_cq_editConfig.xml" is throwing a SAX parse exception in CQ 6.1

Hi,

While trying to install component which was created for 5.6  is throwing an error an exception in CQ 6.1. Please find the trace below.

    18.09.2015 09:07:19.868 *ERROR* [qtp383669503-68] org.apache.jackrabbit.vault.fs.impl.io.GenericArtifactHandler Error while parsing jcr_root/apps/my-foundation/components/content/events/myCalendar/_cq_editConfig.xml: {}
org.xml.sax.SAXException: null
    at org.apache.jackrabbit.vault.fs.impl.io.DocViewSAXImporter.startElement(DocViewSAXImporter.java:653)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)

 

And our "_cq_editConfig.xml" looks like :

<?xml version="1.0" encoding="UTF-8"?>
    <jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
          cq:actions="[text:myCalendar/_cq_editConfig:,edit,delete]"
          cq:dialogMode="floating"
          cq:disableTargeting="true"
          cq:layout="editbar">
    <cq:listeners
        jcr:primaryType="cq:EditListenersConfig"
        afteredit="REFRESH_PAGE"/>
    </jcr:root>

Any pointers to solve this would be a great help.

 

Thanks and Regards,

Kallada

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Kunal_Gaba_
Kunal_Gaba_Accepted solution
New Member
Oct 16, 2015 2:29 AM UTC

You are missing primaryType property definition on the root node. Try the below XML and it should work- 

<?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" cq:actions="[text:myCalendar/_cq_editConfig:,edit,delete]" cq:dialogMode="floating" cq:disableTargeting="true" cq:layout="editbar"jcr:primaryType="cq:EditConfig"> <cq:listeners jcr:primaryType="cq:EditListenersConfig" afteredit="REFRESH_PAGE"/> </jcr:root>

17 replies

Level 2
Oct 16, 2015 2:29 AM UTC

Sorry all, 

I got it wrong. I'm still getting another form of exception.

com.day.jcr.vault.packaging.PackageException: org.apache.jackrabbit.vault.packaging.PackageException: javax.jcr.nodetype.ConstraintViolationException: OakConstraint0001: /apps/my-foundation/components/page/detail[[nt:folder]]: No matching definition found for child node tab_data_source with effective type [cq:Dialog]
    at com.day.jcr.vault.packaging.impl.JrVltJcrPackageAdapter.install(JrVltJcrPackageAdapter.java:109)
    at com.day.crx.packaging.impl.J2EEPackageManager.consoleInstall(J2EEPackageManager.java:329)
    at com.day.crx.packaging.impl.J2EEPackageManager.doPost(J2EEPackageManager.java:171)
    at com.day.crx.packaging.impl.PackageManagerServlet.doPost(PackageManagerServlet.java:144)

Translate
Lokesh_Shivalingaiah
Level 10
Oct 16, 2015 2:29 AM UTC

Check the XML in your 5.6 version. Ideally, primaryType is a default/mandatory property that will have when you create any node !

Translate
Level 2
Oct 16, 2015 2:29 AM UTC

Thanks kunal, it worked it seems. But these components were perfectly working with 5.6.

Translate
Level 2
Oct 16, 2015 2:29 AM UTC

Thanks loki, the error thrown while installing is gone now!!!

Translate
Kunal_Gaba_
New Member
Oct 16, 2015 2:29 AM UTC
That's because the type of page node is "nt:folder". Try changing the nodetype of page node and it should work.
Translate
Lokesh_Shivalingaiah
Level 10
Oct 16, 2015 2:29 AM UTC

Can you try with this

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
          jcr:primaryType="cq:Dialog"
          title="Data Source"

          xtype="panel">

    <items jcr:primaryType="cq:WidgetCollection">
        <datasource
                jcr:primaryType="cq:Widget"
                collapsed="{Boolean}false"
                collapsible="{Boolean}false"
                title="Data Source"
                xtype="dialogfieldset">
            <items jcr:primaryType="cq:WidgetCollection">
                <canonical
                        jcr:primaryType="cq:Widget"
                        fieldLabel="Client Libaries"
                        name="./my-client-libs"
                        xtype="textfield"/>
                <rootclass
                        jcr:primaryType="cq:Widget"
                        fieldLabel="Root Class"
                        name="./my-root-class"
                        xtype="textfield"/>
            </items>
        </datasource>
    </items>
</jcr:root>

Translate
Kunal_Gaba_
Kunal_Gaba_Accepted solution
New Member
Oct 16, 2015 2:29 AM UTC

You are missing primaryType property definition on the root node. Try the below XML and it should work- 

<?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" cq:actions="[text:myCalendar/_cq_editConfig:,edit,delete]" cq:dialogMode="floating" cq:disableTargeting="true" cq:layout="editbar"jcr:primaryType="cq:EditConfig"> <cq:listeners jcr:primaryType="cq:EditListenersConfig" afteredit="REFRESH_PAGE"/> </jcr:root>
Translate