Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Oak Index with AEM as Cloud service

Avatar

Level 1

I am trying to create a custom Index.

I have placed Index under apps/_oak_index.

 

I am using below filter

<filter root="/oak:index">
<include pattern="/oak:index/cqPageLucene-custom-.*(/.*)?"/>
</filter>

 

I have set allowIndexDefinitions as true.

Jackrabbit FileVault Package Plugin used as below in the all POM

 

<groupId>org.apache.jackrabbit</groupId>
<artifactId>filevault-package-maven-plugin</artifactId>
<extensions>true</extensions>
<version>1.1.6</version>

 

we are getting the below error

 

srimupparaju1_0-1635258796863.png

 

error log:

Register node types from tccl:aem.cnd
[INFO] Using 9 validators for package of type APPLICATION: jackrabbit-accesscontrol (org.apache.jackrabbit.vault.validation.spi.impl.AccessControlValidator), jackrabbit-filter (org.apache.jackrabbit.vault.validation.spi.impl.AdvancedFilterValidator), jackrabbit-properties (org.apache.jackrabbit.vault.validation.spi.impl.AdvancedPropertiesValidator), jackrabbit-docviewparser (org.apache.jackrabbit.vault.validation.spi.impl.DocumentViewParserValidator), jackrabbit-dependencies (org.apache.jackrabbit.vault.validation.spi.impl.DependencyValidator), jackrabbit-emptyelements (org.apache.jackrabbit.vault.validation.spi.impl.EmptyElementsValidator), jackrabbit-mergelimitations (org.apache.jackrabbit.vault.validation.spi.impl.MergeLimitationsValidator), jackrabbit-packagetype (org.apache.jackrabbit.vault.validation.spi.impl.PackageTypeValidator), jackrabbit-nodetypes (org.apache.jackrabbit.vault.validation.spi.impl.nodetype.NodeTypeValidator)
[ERROR] ValidationViolation: "jackrabbit-packagetype: Package of type 'APPLICATION' is not supposed to contain includes/excludes below any of its filters!", filePath=META-INF\vault\filter.xml

1 Accepted Solution

Avatar

Correct answer by
Employee

There error is: 

 

[ERROR] ValidationViolation: "jackrabbit-packagetype: Package of type 'APPLICATION' is not supposed to contain includes/excludes below any of its filters!", filePath=META-INF\vault\filter.xml

 

So i think you need to explicitly name your index definition node to include, so far example:

 

<filter root="/oak:index/cqPageLucene-3-custom-4"/>

 

Rather than using the include/excludes under the filter (which allow your wild cards) - try naming your indexes explicitly.

View solution in original post

4 Replies

Avatar

Correct answer by
Employee

There error is: 

 

[ERROR] ValidationViolation: "jackrabbit-packagetype: Package of type 'APPLICATION' is not supposed to contain includes/excludes below any of its filters!", filePath=META-INF\vault\filter.xml

 

So i think you need to explicitly name your index definition node to include, so far example:

 

<filter root="/oak:index/cqPageLucene-3-custom-4"/>

 

Rather than using the include/excludes under the filter (which allow your wild cards) - try naming your indexes explicitly.

Avatar

Level 2

Hi we have tried everything but it seems like when we have to convert the oak indexes by
running aio aem-migration:index-converter as mention in the https://experienceleague.adobe.com/docs/experience-manager-learn/cloud-service/migration/moving-to-a...

we are getting error of 
Index Conversion Start...
Base AEM Version for Reference 65
Error: ENOENT: no such file or directory, copyfile
'/D:/ACS-Rebuild/AEM_Branches/ACS/AEM/ui.apps/src/main/content/META-INF/vault/filter.xml' ->

'target\index\filter.xml'
Code: ENOENT
we have already seen the yaml file and the location of filter.xml and _oak_indexes is fine too.

Avatar

Employee

Im not entirely certain (i dont have a Windows machine to test) but it looks like its failing (because it cant find the folder/file) to copy /D:/ACS-Rebuild/AEM_Branches/ACS/AEM/ui.apps/src/main/content/META-INF/vault/filter.xml'

 

... That makes some sense since it appears the Windows path is actually starting with a "/D:...." which, i assume is invalid path syntax? Assuming you arent putting the leading slash in - Maybe you could try making the path to your project relative and see if that works?

 

Avatar

Level 2

Hi,

We have tried all permutations and combinations regarding the path, if the path is given from  "D:" or relative path then this error occurs

 

********** Executing Index Converter ********** Index Conversion Start... Base AEM Version for Reference 64 TypeError: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received undefined Code: ERR_INVALID_ARG_TYPE PS D:\ACS-Rebuild\AEM_Branches\ACS\AEM>

 

 

btw i saw your answer where you suggested to make changes in parent pom, and add allowindexdefinition to true(don't consider the letter case here) so only problem is using the tool. I think using  the oak indexes which were used in 6.5 are not enough, we need to convert its structure which is compatible in cloud and that's when the build would deploy.