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
<?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>
Solved! Go to Solution.
Views
Replies
Total Likes
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
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
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
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 ?
Views
Replies
Total Likes
Please enable "vault-validation" for your project. We should be able to catch issues in local maven builds.
Reference:
Views
Replies
Total Likes
You can delete the empty node from .content.xml
i.e.
adminui-extension/.content.xml
<foldermetadataschema/>
<metadataprofile/>
facets/.content.xml
<assets/>
Views
Likes
Replies