AEM as a Cloud: java.lang.IllegalStateException: Parent node at path [/oak:index] not found while adding new index definition | Community
Skip to main content
March 11, 2022
Solved

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

  • March 11, 2022
  • 1 reply
  • 2077 views

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>

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Vijayalakshmi_S

@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>

1 reply

Vijayalakshmi_S
Vijayalakshmi_SAccepted solution
Level 10
March 11, 2022

@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>
March 12, 2022

Thanks for the reply. It resolves the error.