Jackrabbit emptyelements: Found empty node | Adobe Higher Education
Skip to main content
Mario248
Level 7
December 2, 2022
解決済み

Jackrabbit emptyelements: Found empty node

  • December 2, 2022
  • 3 の返信
  • 3159 ビュー

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>

このトピックへの返信は締め切られました。
ベストアンサー aanchal-sikka

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

3 の返信

Community Advisor
December 2, 2022

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

aanchal-sikka
Community Advisor
Community Advisor
December 3, 2022

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
Mario248
Mario248作成者
Level 7
December 5, 2022

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 ?

aanchal-sikka
Community Advisor
Community Advisor
December 6, 2022

Please enable "vault-validation" for your project. We should be able to catch issues in local maven builds.

Reference:

Aanchal Sikka
arunpatidar
Community Advisor
Community Advisor
December 5, 2022

You can delete the empty node from .content.xml

i.e.

adminui-extension/.content.xml

 

<foldermetadataschema/> <metadataprofile/>

 

 

 facets/.content.xml

 

<assets/>

 

Arun Patidar