This conversation has been locked due to inactivity. Please create a new post.
This conversation has been locked due to inactivity. Please create a new post.
Hi all,
I got a lot of errors related to the sling:resourceSuperType while installing the package.
I copied /apps/mysite/wcm/foundation/components/basicpage/v1/basicpage to /apps/mysite/wcm/foundation/components/basicpage/v2/basicpage for further implementation without touching v1. the content of basicpage/v2/basicpage/.content.xml:
<?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"
jcr:primaryType="cq:Component"
jcr:title="Basic Page"
sling:resourceSuperType="wcm/foundation/components/basicpage/v1/basicpage"
componentGroup=".hidden"/>Then when I run `mvn clean install`, I get a lot of errors as:
org.apache.jackrabbit.vault.fs.io.Importer E /apps/mysite/wcm/foundation/components/basicpage/v2/basicpage (org.xml.sax.SAXParseException; systemId: file:///apps/aem65/jcr_root/apps/mysite/wcm/foundation/components/basicpage/v2/basicpage/.content.xml; lineNumber: 6; columnNumber: 31; The prefix "sling" for attribute "sling:resourceSuperType" associated with an element type "jcr:root" is not bound.)
When I got rid of the "sling:resourceSuperType...", the errors are gone. Changing the sling:resourceSuperType location to "/apps/mysite/wcm/foundation/components/basicpage/v1/basicpage" won't work, either. I wonder why <jcr:root...> is unable to have an attribute of "sling:resourceSuperType".
Thanks!
-kt
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @kevingtan,
Sling namespace is missing in your .content.xml file. You have to add below definition, to solve the problem:
xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
so your file will look like that:
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="cq:Component"
jcr:title="Basic Page"
sling:resourceSuperType="wcm/foundation/components/basicpage/v1/basicpage"
componentGroup=".hidden"/>
Hi @kevingtan,
Sling namespace is missing in your .content.xml file. You have to add below definition, to solve the problem:
xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
so your file will look like that:
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="cq:Component"
jcr:title="Basic Page"
sling:resourceSuperType="wcm/foundation/components/basicpage/v1/basicpage"
componentGroup=".hidden"/>
Thank you!
No wonder some of the xml files don't have such an issue, and they really have the correct namespace.
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies