Expand my Community achievements bar.

SOLVED

Jackrabbit emptyelements: Found empty node

Avatar

Level 9

I am trying to build a workflow model in AEMaaCS but it failed to build the code with below errors, but the same is working in my local AEM SDK without having any error. 

 

16:24:43,523 [main] [ERROR] ValidationViolation: "jackrabbit-emptyelements: Found empty node (used for ordering only) without an accompanying folder which are included in the filter with mode=replace. Either remove the empty node or add at least the 'jcr:primaryType' attribute to make this node really get replaced.", filePath=jcr_root/conf/global/settings/dam/adminui-extension/.content.xml, nodePath=/conf/global/settings/dam/adminui-extension/foldermetadataschema

 
16:24:43,538 [main] [ERROR] ValidationViolation: "jackrabbit-emptyelements: Found empty node (used for ordering only) without an accompanying folder which are included in the filter with mode=replace. Either remove the empty node or add at least the 'jcr:primaryType' attribute to make this node really get replaced.", filePath=jcr_root/conf/global/settings/dam/adminui-extension/.content.xml, nodePath=/conf/global/settings/dam/adminui-extension/metadataprofile
 
16:24:43,540 [main] [ERROR] ValidationViolation: "jackrabbit-emptyelements: Found empty node (used for ordering only) without an accompanying folder which are included in the filter with mode=replace. Either remove the empty node or add at least the 'jcr:primaryType' attribute to make this node really get replaced.", filePath=jcr_root/conf/global/settings/dam/search/facets/.content.xml, nodePath=/conf/global/settings/dam/search/facets/jcr:content
 
Here are my actual xml files caused,  
adminui-extension/.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:Page">
    <metadataschema/>
    <foldermetadataschema/>
    <metadataprofile/>
</jcr:root>

 

 facets/.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:Page">
    <assets/>
    <jcr:content/>
</jcr:root>

 

POM

 

<plugin>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>filevault-package-maven-plugin</artifactId>
<configuration>
<filters>
<filter><root>/conf</root></filter>
</filters>
<properties>
<cloudManagerTarget>none</cloudManagerTarget>
</properties>
<group>com.xxx</group>
<name>aem-xxx-project.ui.content</name>
<packageType>content</packageType>
<accessControlHandling>merge</accessControlHandling>
<validatorsSettings>
<jackrabbit-filter>
<options>
<validRoots>/conf,/content,/content/experience-fragments,/content/dam</validRoots>
</options>
</jackrabbit-filter>
</validatorsSettings>
<dependencies>
<dependency>
<groupId>com.xxx</groupId>
<artifactId>aem-xxx-project.ui.apps</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</configuration>
</plugin>

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

May be you should try using "vault-validation" for your project. The issues like "jackrabbit-emptyelements" can then be captured locally. Reference:

Quick fix:

Please delete the empty elements like <foldermetadataschema/>, which are not deployed via code base.

In filters, use merge/update for paths like "/conf/global/settings/dam/adminui-extension". It would avoid deletion of any foldermetadataschema created manually on server


Aanchal Sikka

View solution in original post

5 Replies

Avatar

Level 6

Hi @Mario248

AFAIK the build that runs on AEM Cloud runs with different maven commands than the command that we usually run (mvn clean install -PautoInstallPackage) in our local AEM SDK.

If you check the build logs you can find those commands. Try to run those commands in your local and there as well build will fail.

So you need to set the jcr:primaryType to get rid of this error at both places.

Thanks

Swapnil

Avatar

Correct answer by
Community Advisor

May be you should try using "vault-validation" for your project. The issues like "jackrabbit-emptyelements" can then be captured locally. Reference:

Quick fix:

Please delete the empty elements like <foldermetadataschema/>, which are not deployed via code base.

In filters, use merge/update for paths like "/conf/global/settings/dam/adminui-extension". It would avoid deletion of any foldermetadataschema created manually on server


Aanchal Sikka

Avatar

Level 9

Thank you. It resolved the problem by deleting the empty nodes but why this was not happened in my local AEM. Any idea how to reproduce this issue in local first before goes to cloud ?

Avatar

Community Advisor

You can delete the empty node from .content.xml

i.e.

adminui-extension/.content.xml

 

    <foldermetadataschema/>
    <metadataprofile/>

 

 

 facets/.content.xml

 

<assets/>

 



Arun Patidar