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

AEM as a Cloud: java.lang.IllegalStateException: Parent node at path [/oak:index] not found while adding new index definition

Avatar

Level 1

Hi Team,

I created a custom index for an AEM as a cloud environment. deployment is successful.

But in deployment logs, I am getting the following error log.

Can someone please help with what I am missing?

 

java.lang.IllegalStateException: Parent node at path [/oak:index] not found while adding new index definition for [/oak:index/acme.xxxxxxxxx-custom-1]. Intermediate paths node must exist for new index nodes to be created
at com.google.common.base.Preconditions.checkState(Preconditions.java:197)
at org.apache.jackrabbit.oak.plugins.index.importer.IndexDefinitionUpdater.apply(IndexDefinitionUpdater.java:82)
at org.apache.jackrabbit.oak.plugins.index.importer.IndexDefinitionUpdater.apply(IndexDefinitionUpdater.java:71)
at org.apache.jackrabbit.oak.index.IndexerSupport.updateIndexDefinitions(IndexerSupport.java:118)
at org.apache.jackrabbit.oak.index.IndexerSupport.switchIndexLanesAndReindexFlag(IndexerSupport.java:133)
at org.apache.jackrabbit.oak.index.OutOfBandIndexerBase.reindex(OutOfBandIndexerBase.java:76)
at com.adobe.granite.indexing.tool.ReindexCmd.index(ReindexCmd.java:132)
at com.adobe.granite.indexing.tool.ReindexCmd.run(ReindexCmd.java:94)
at com.adobe.granite.indexing.tool.Main.main(Main.java:67) 

 

The index definition is:

 

<acme.xxxxxxxxxxxxxx-custom-1
jcr:primaryType="oak:QueryIndexDefinition"
async="async"
compatVersion="{Long}2"
evaluatePathRestrictions="{Boolean}true"
type="lucene">
<indexRules jcr:primaryType="nt:unstructured">
<cq:PageContent
jcr:primaryType="nt:unstructured"
includePropertyTypes="all">
<properties jcr:primaryType="nt:unstructured">
<xxxxxxxxxxxxxx
jcr:primaryType="nt:unstructured"
propertyIndex="{Boolean}true"
name="xxxxxxxxxxxxxx"/>
<yyyyyyyyy
jcr:primaryType="nt:unstructured"
propertyIndex="{Boolean}true"
name="yyyyyyyyy"/>
<zzzzzzzzzzz
jcr:primaryType="nt:unstructured"
propertyIndex="{Boolean}true"
name="zzzzzzzzzzz"/>
<axaxaxaxxa
jcr:primaryType="nt:unstructured"
propertyIndex="{Boolean}true"
name="axaxaxaxxa"/>
</properties>
</cq:PageContent>
</indexRules>
</acme.xxxxxxxxxxxxxx-custom-1>

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@vijaykandpal2 

If the deployment is done in DEV cloud service instance, can you cross check if the custom index definition exist via CRXDE and the concern is only on the error in the logs (as you have mentioned the deployment is successful)

Can you confirm on the below

  • index definition is included in ui.apps module at \ui.apps\src\main\content\jcr_root\_oak_index\.content.xml
    • and an entry in filter.xml as /oak:index/acme.xxx.custom-1
  • if you have below in ui.apps module's pom.xml -> filevault-package-maven-plugin -> properties
    • <noIntermediateSaves>true</noIntermediateSaves>

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

@vijaykandpal2 

If the deployment is done in DEV cloud service instance, can you cross check if the custom index definition exist via CRXDE and the concern is only on the error in the logs (as you have mentioned the deployment is successful)

Can you confirm on the below

  • index definition is included in ui.apps module at \ui.apps\src\main\content\jcr_root\_oak_index\.content.xml
    • and an entry in filter.xml as /oak:index/acme.xxx.custom-1
  • if you have below in ui.apps module's pom.xml -> filevault-package-maven-plugin -> properties
    • <noIntermediateSaves>true</noIntermediateSaves>