CaConfig Save Configuration Error | Community
Skip to main content
Sady_Rifat
Community Advisor
Community Advisor
November 8, 2022
Solved

CaConfig Save Configuration Error

  • November 8, 2022
  • 1 reply
  • 2053 views

Hello,
I am trying to configure CA Config by wcm.io. After adding the configuration when I tried to save that configuration I got that error dialog.

 

In the error.log file, I found this.

org.apache.sling.caconfig.spi.ConfigurationPersistenceException: Unable to persist configuration: Configuration resolving strategy returned no path.
at org.apache.sling.caconfig.management.impl.ConfigurationManagerImpl.persistConfiguration(ConfigurationManagerImpl.java:278) [org.apache.sling.caconfig.impl:1.4.14]
at io.wcm.caconfig.editor.impl.ConfigPersistServlet.doPost(ConfigPersistServlet.java:132) [io.wcm.caconfig.editor:1.8.2]
at org.apache.sling.api.servlets.SlingAllMethodsServlet.mayService(SlingAllMethodsServlet.java:146) [org.apache.sling.api:2.22.0]
at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:342) [org.apache.sling.api:2.22.0]
at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:374) [org.apache.sling.api:2.22.0]
at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:574) [org.apache.sling.engine:2.7.10.B0002]
at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:45) [org.apache.sling.engine:2.7.10.B0002]
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:88) [org.apache.sling.engine:2.7.10.B0002]

 Don't understand why this happened. It's not only on my custom configuration as well on all the available configurations.
Note: Trying this with a fresh new AEM project and new AEM environment(6.5.14)

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 arunpatidar

Yes, I got the following error on file granite.js:272

 


The error is thrown at https://github.com/apache/sling-org-apache-sling-caconfig-impl/blob/master/src/main/java/org/apache/sling/caconfig/management/impl/ConfigurationManagerImpl.java 

 

I am not sure what could be the reason for that if you have correct configurations

check https://sling.apache.org/documentation/bundles/context-aware-configuration/context-aware-configuration-default-implementation.html#context-paths-1 as well

1 reply

arunpatidar
Community Advisor
Community Advisor
November 8, 2022

You have to make sure few things are done before you create any osgi config and save values e.g.
values are stored inside /conf , so make sure you have permissions there

1. add property sling:configRef="/conf/<path>to your root, e.g. https://github.com/arunpatidar02/aemaacs-aemlab/blob/master/ui.content/src/main/content/jcr_root/content/aemlab/oneweb/.content.xml 

2. install the CAC extension and update osg config io.wcm.caconfig.extensions.contextpath.impl.AbsoluteParentContextPathStrategy

e.g. https://github.com/arunpatidar02/aemaacs-aemlab/blob/master/ui.apps/src/main/content/jcr_root/apps/aemlab/oneweb/config/io.wcm.caconfig.extensions.contextpath.impl.AbsoluteParentContextPathStrategy-aemlab.cfg.json 

Arun Patidar
Sady_Rifat
Community Advisor
Community Advisor
November 8, 2022

Hi @arunpatidar,
Thanks for your reply. Since I am an admin user in the /conf node I have full access. Also, I crossed checked and have permission on that node.
Also instructions no 1 & 2 I already followed.

Actually, the configuration list is available. But when I tried to save a configuration that time I got the error.

 

arunpatidar
Community Advisor
Community Advisor
November 8, 2022

Can you check the browser console, what error are you getting.

I am using the CAC in local and it works well

here is the example of my setup

https://github.com/arunpatidar02/aemaacs-aemlab/pull/6 

Arun Patidar