Expand my Community achievements bar.

SOLVED

Jackrabbit- Property is not allowed in node with potential default types [nt:folder]

Avatar

Level 9

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. 

 

I'm not sure if cloud instance expects nt:folder instead of nt:unstructure. Does anyone have experience with a similar problem?

 

13:40:53,475 [main] [ERROR] ValidationViolation: "jackrabbit-nodetypes: Property 'cq:template' [String] is not allowed in node with potential default types [nt:folder]: No applicable property definition found for name and type!", filePath=jcr_root/conf/global/settings/models/Review-Document/.content.xml, nodePath=/conf/global/settings/models/Review-Document/jcr:content, line=12, column=58


13:40:53,478 [main] [ERROR] ValidationViolation: "jackrabbit-nodetypes: Property 'jcr:title' [String] is not allowed in node with potential default types [nt:folder]: No applicable property definition found for name and type!", filePath=jcr_root/conf/global/settings/models/Review-Document/.content.xml, nodePath=/conf/global/settings/models/Review-Document/jcr:content, line=12, column=58

 

13:40:53,482 [main] [ERROR] ValidationViolation: "jackrabbit-nodetypes: Property 'cq:lastModified' [Date] is not allowed in node with potential default types [nt:folder]: No applicable property definition found for name and type!", filePath=jcr_root/conf/global/settings/models/Review-Document/.content.xml, nodePath=/conf/global/settings/models/Review-Document/jcr:content, line=12, column=58

 

13:40:53,487 [main] [ERROR] ValidationViolation: "jackrabbit-nodetypes: Property 'cq:lastModifiedBy' [String] is not allowed in node with potential default types [nt:folder]: No applicable property definition found for name and type!", filePath=jcr_root/conf/global/settings/models/Review-Document/.content.xml, nodePath=/conf/global/settings/models/Review-Document/jcr:content, line=12, column=58

 

13:40:53,488 [main] [ERROR] ValidationViolation: "jackrabbit-nodetypes: Property 'sling:resourceType' [String] is not allowed in node with potential default types [nt:folder]: No applicable property definition found for name and type!", filePath=jcr_root/conf/global/settings/models/Review-Document/.content.xml, nodePath=/conf/global/settings/models/Review-Document/jcr:content, line=12, column=58

 

13:40:53,489 [main] [ERROR] ValidationViolation: "jackrabbit-nodetypes: Property 'lastSynced' [Date] is not allowed in node with potential default types [nt:folder]: No applicable property definition found for name and type!", filePath=jcr_root/conf/global/settings/models/Review-Document/.content.xml, nodePath=/conf/global/settings/models/Review-Document/jcr:content, line=12, column=58

 

13:40:53,490 [main] [ERROR] ValidationViolation: "jackrabbit-nodetypes: Property 'cq:designPath' [String] is not allowed in node with potential default types [nt:folder]: No applicable property definition found for name and type!", filePath=jcr_root/conf/global/settings/models/Review-Document/.content.xml, nodePath=/conf/global/settings/models/Review-Document/jcr:content, line=12, column=58

 

13:40:53,490 [main] [ERROR] ValidationViolation: "jackrabbit-filter: Node '/conf/global/settings/models/Review-Document/jcr:content/flow' is not contained in any of the filter rules", filePath=jcr_root/conf/global/settings/models/Review-Document/.content.xml, nodePath=/conf/global/settings/models/Review-Document/jcr:content/flow, line=15, column=63

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello,

Folder "/conf/global/settings/workflow/models" and sub-folders should be of type "sling:Folder".

And I guess "Review-Document" is a Workflow Model. In this case, please check its "jcr:primaryType". It should be "cq:Page".

The errors that you have mentioned often occur when we do not have proper jcr:primaryType deployed via code.

In case of local, we often edit via UI, and AEM assures that proper types are created for the parent node and the current one.

Thus, when we deploy to server, we need to take care of filters in our code. The hierarchy and the "Review-Document" should deploy expected node types.


Aanchal Sikka

View solution in original post

5 Replies

Avatar

Level 5

Hi @Mario248

It is because of the jackrabbit version issue, could you please update the dependency of the jackrabbit validator in the pom and try to built it, that should resolve the issue.

https://issues.apache.org/jira/browse/JCRVLT-489

Please refer above thread for more information.

Avatar

Level 9

Sorry, I don't see any solution on the above ticket. Could you please let me know which jackrabbit validator I should use in my pom file? Any sample code snippets ?

 

Avatar

Employee Advisor

@Mario248

Shouldn't this be

/conf/global/settings/workflow/models/Review-Document/

instead of

/conf/global/settings/models/Review-Document/

Please check

Avatar

Community Advisor

Hi @Mario248 : Warnings looks valid as nt:folder node is not allowed to have property like jcr:title. Please remove the invalid properties from .content.xml and build would work fine.

Please refer this screenshot on how warning is coming if I manually try to add property jcr:title on nt:folder node.

sachinarora_5-1670045712746.png

Avatar

Correct answer by
Community Advisor

Hello,

Folder "/conf/global/settings/workflow/models" and sub-folders should be of type "sling:Folder".

And I guess "Review-Document" is a Workflow Model. In this case, please check its "jcr:primaryType". It should be "cq:Page".

The errors that you have mentioned often occur when we do not have proper jcr:primaryType deployed via code.

In case of local, we often edit via UI, and AEM assures that proper types are created for the parent node and the current one.

Thus, when we deploy to server, we need to take care of filters in our code. The hierarchy and the "Review-Document" should deploy expected node types.


Aanchal Sikka