"_cq_editConfig.xml" is throwing a SAX parse exception in CQ 6.1 | Community
Skip to main content
New Participant
October 16, 2015
Solved

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

  • October 16, 2015
  • 17 replies
  • 3879 views

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.
Best answer by Kunal_Gaba_

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

Kunal_Gaba_
Kunal_Gaba_Accepted solution
New Participant
October 16, 2015

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>
Lokesh_Shivalingaiah
New Participant
October 16, 2015

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>

Kunal_Gaba_
New Participant
October 16, 2015
That's because the type of page node is "nt:folder". Try changing the nodetype of page node and it should work.
New Participant
October 16, 2015

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

New Participant
October 16, 2015

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

Lokesh_Shivalingaiah
New Participant
October 16, 2015

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

New Participant
October 16, 2015

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)

New Participant
October 16, 2015

Hi All,

Following the SAX parse exception, we are now facing with :

                                      javax.jcr.nodetype.ConstraintViolationException: No matching node definition found for tab_data_source

in one of our legacy components, Any Idea on this?

Thanks a lot,

Lokesh_Shivalingaiah
New Participant
October 16, 2015

my-foundation/components/page/detail -  is each one of these nodes are 'nt:folder' ?

Lokesh_Shivalingaiah
New Participant
October 16, 2015

Is it for the same component or different ? can you post your updated XML with which you are trying