Menu

Showing posts with label Adobe AEM-CQ5. Show all posts
Showing posts with label Adobe AEM-CQ5. Show all posts

Naming conventions in the JCR

Adhering to naming conventions in Java Content Repository (JCR) enhances code consistency, reduces the occurrence of defects, and boosts developer productivity within the system. Adobe employs the following conventions in the development of AEM:

Node names

  • All lower case
  • Word separation using hyphens

Property names

  • Camel case, starting with a lower case letter

Components (JSP/HTML)

  • All lower case
  • Word separation using hyphens

References

  • https://experienceleague.adobe.com/docs/experience-manager-65/developing/bestpractices/content-architecture.html

The analyser found the following errors

[ERROR] The analyser found the following errors for author and publish :

[ERROR] [api-regions-exportsimports] com.adobe.learning:aem-learning-core:1.0.1: Bundle aem-learning-core:1.0.1 is importing package(s) com.adobe.acs.commons.util in start level 20 but no bundle is exporting these for that start level. (com.adobe.learning:aem-learning.all:1.0.1)


Resolution

Remove the scope tag from the com.adobe.acs dependency in child pom.xml file. 

e.g.

<dependency>
<groupId>com.adobe.acs</groupId>
<artifactId>acs-aem-commons-bundle</artifactId>
</dependency>

Run local AEM on https

Installing a SSL certificate to local AEM instance.

https://experienceleague.adobe.com/docs/experience-manager-learn/foundation/security/use-the-ssl-wizard.html#

Direct integration of cloud manager in your git repository

Would you like to move from adobe managed git in cloud manager to self managed git repository? Adobe cloud manager is now running program where we could directly integrate any git repository to cloud manager. When you will open cloud manager, it will ask to opt this feature with a request form. 

You will see below form in cloud manager to opt the feature of using direct git repo.


References

https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/implementing/using-cloud-manager/managing-code/integrating-with-git.html

How to recompile clientlibs in AEM?

Go to http://localhost:4502/libs/granite/ui/content/dumplibs.rebuild.html

Here you will see two buttons. As shown in below screenshot.

1. Invalidate cache

2. Rebuild Libraries

How to invalidate cache in AEM
Invalidate cache in AEM



Invalidate cache

Invalidate cache option is to invalidate the cahe from AEM. Once you will click on this button you will see a success or failure message on the same page. Below is the screenshot of successful invalidation.



Rebuild Client Libraries

Rebuild clientlibs will be rebuild the entire client library of AEM. After successful rebuild you would see the below screen. 

Rebuild AEM clientlibs
How to rebuild AEM client libraries
Rebuild AEM client Libraries



AEM as Cloud Service does not support custom runmode config

Adobe Experience Manager as Cloud Service (AEM as CS) doesn't support custom run mode configuration. The supported runmode configurations are:

  • config (The default, applies to all AEM Services)
  • config.author (Applies to all AEM Author service)
  • config.author.dev (Applies to AEM Dev Author service)
  • config.author.stage (Applies to AEM Staging Author service)
  • config.author.prod (Applies to AEM Production Author service)
  • config.publish (Applies to AEM Publish service)
  • config.publish.dev (Applies to AEM Dev Publish service)
  • config.publish.stage (Applies to AEM Staging Publish service)
  • config.publish.prod (Applies to AEM Production Publish service)
  • config.dev (Applies to AEM Dev services)
  • config.stage (Applies to AEM Staging services)
  • config.prod (Applies to AEM Production services)

JUnit for AEM sling model class with adaptables SlingHttpServletRequest

Sling Model class

We have this sling model class for that we are going to write unit test using JUnit5.


@Model(adaptables = SlingHttpServletRequest.class, 
defaultInjectionStrategy = DefaultInjectionStrategy.OPTIONAL)
public class LinkCheckerModel {
@Inject
@Named("link")
@Source("request-attributes")
private String link;

@Inject
@Source("sling-object")
private ResourceResolver resolver;

private boolean isExternal;

private String updatedLink;
    private final static String DOT_HTML = ".html";
private final Logger logger = LoggerFactory.getLogger(getClass());

@PostConstruct
public void init() {
try {
isExternal = false;
if(StringUtils.isNotBlank(link)) {
if (!isInternal(link)) {
isExternal = true;
updatedLink = link;
} else {
link = link.contains(DOT_HTML) ? link : (link + DOT_HTML);
updatedLink = resolver.map(link);
}
}
} catch (Exception e) {
logger.error("Exception occurs while checking link:{}", e.getMessage());
}
logger.info("Exit init method of Linkchecker Model");
}

private boolean isInternal(String linkStr) {
return linkStr.startsWith("/content") && !linkStr.startsWith("/content/dam");
}
public boolean isExternal() {
return isExternal;
}
public String getUpdatedLink() {
return updatedLink;
}
}

Test class

Generate or create the test class of our sling model class. In this case we have class LinkCheckerModel and created Test class LinkCheckerModelTest.java.

Note: Right click on the class name and choose the option to generate the test. Then select the methods for that you want to create test methods.


import io.wcm.testing.mock.aem.junit5.AemContext;
import io.wcm.testing.mock.aem.junit5.AemContextExtension;
import org.apache.commons.lang3.StringUtils;
import org.apache.sling.api.SlingHttpServletRequest;
import org.apache.sling.api.resource.Resource;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mock;

import static org.junit.jupiter.api.Assertions.*;

@ExtendWith(AemContextExtension.class)
class LinkCheckerModelTest {
private AemContext context = new AemContext();
@Mock
private SlingHttpServletRequest request;
LinkCheckerModel linkCheckerModel = new LinkCheckerModel();
@BeforeEach
void setUp() {
context.load().json("/linkChecker.json", "/content/jorvee/en");
context.addModelsForClasses(LinkCheckerModel.class);
Resource resource = context.resourceResolver().
getResource("/content/jorvee/en/jcr:content/parsys/linkCheckerNode");
        linkCheckerModel = context.request().adaptTo(LinkCheckerModel.class);

linkCheckerModel.init();
}

@Test
void initTest() {

}

@Test
void isExternalTest() {
assertNotNull(linkCheckerModel.isExternal());
}

@Test
void getUpdatedLinkTest() {
assertNull(linkCheckerModel.getUpdatedLink());
}
}


JSON data [linkChecker.json]

The JSON data on which we will mock the request. Create a JSON file with name linkChecker.json and add this json object into that.

{
"jcr:primaryType": "cq:Page",
"jcr:content": {
"cq:contextHubPath": "/etc/cloudsettings/default/contexthub",
"cq:contextHubSegmentsPath": "/etc/segmentation/contexthub",
"cq:designPath": "/etc/designs/jorvee",
"cq:lastModified": "{Date}2020-04-14T19:23:41.457+05:30",
"cq:lastModifiedBy": "admin",
"cq:lastReplicated": "{Date}2020-02-10T19:55:14.981Z",
"cq:lastReplicatedBy": "admin",
"cq:lastReplicationAction": "Activate",
"cq:template": "/apps/jorvee/templates/basic",
"jcr:primaryType": "cq:PageContent",
"jcr:title": "Jorvee | Homepage",
"releaseDate": "Wed Apr 01 2020 00:00:00 GMT+0530",
"sling:resourceType": "jorvee/components/pages/basic/v1/basic",
"section": "sect",
"parsys": {
"jcr:primaryType": "nt:unstructured",
"sling:resourceType": "wcm/foundation/components/parsys",
"linkCheckerNode": {
"jcr:primaryType": "nt:unstructured",
"sling:resourceType": "jorvee/components/buttons/linkChecker",
"link": "/content/jorvee"
}
}
}
}

Run the test

You are all set and now it's time to test the class and methods. You can run the testclass from run option of the IDE. also you can run the test calss using maven command for just a single class.

mvn test -Dtest=<className>

e.g. mvn test -Dtest=LinkCheckerModelTest


Junit Tutorials

 

How to increase the layout size of a dialog in aem

We can increase the height and width of a dialog by adding properties height and width on the dialog node.

height="{Long}700"

width="{Long}500"






 

How to get bundle information from AEM

We can access the detail on an AEM bundle outside the Apache Felix console using the bundle symbolic name and JSON extension with system console bundle path. http://localhost:4502/system/console/bundles/<bundle-symbolic-name>.json 

e.g. http://localhost:4502/system/console/bundles/com.adobe.aem.graphql.api.json

Above URL will generate and provide all the detail of the bundle in json format, that we could anywhere. Result will be like below json.

{
  status: "Bundle information: 628 bundles in total - all 628 bundles active.",
  s: [
    628,
    624,
    4,
    0,
    0
  ],
  data: [
    {
      id: 588,
      name: "GraphQL - API",
      fragment: false,
      stateRaw: 32,
      state: "Active",
      version: "0.0.1.CQ650-B0004",
      symbolicName: "com.adobe.aem.graphql.api",
      category: "adobe,aem",
      props: [
        {
          key: "Symbolic Name",
          value: "com.adobe.aem.graphql.api"
        },
        {
          key: "Version",
          value: "0.0.1.CQ650-B0004"
        },
        {
          key: "Bundle Location",
          value: "bundle582:com.adobe.aem.graphql.api-0.0.1-CQ650-B0004.jar"
        },
        {
          key: "Last Modification",
          value: "Thu Sep 01 15:19:02 IST 2022"
        },
        {
          key: "Bundle Documentation",
          value: "https://docs.adobe.com"
        },
        {
          key: "Vendor",
          value: "Adobe"
        },
        {
          key: "Description",
          value: "The parent project to the Adobe Experience Manager parts"
        },
        {
          key: "Start Level",
          value: 20
        },
        {
          key: "Exported Packages",
          value: [
            "com.adobe.aem.graphql.api,version=1.0.0"
          ]
        },
        {
          key: "Imported Packages",
          value: [
            "org.apache.sling.api.resource,version=2.12.1 from <a href='/system/console/bundles/77'>org.apache.sling.api (77)</a>"
          ]
        },
        {
          key: "Importing Bundles",
          value: [
            "<a href='/system/console/bundles/589'>com.adobe.aem.graphql.impl (589)</a>",
            "<a href='/system/console/bundles/591'>com.adobe.aem.graphql.sites-base (591)</a>"
          ]
        },
        {
          key: "Manifest Headers",
          value: [
            "Bnd-LastModified: 1627451068224",
            "Build-Jdk: 11",
            "Built-By: maji",
            "Bundle-Category: adobe, aem",
            "Bundle-Description: The parent project to the Adobe Experience Manager parts",
            "Bundle-DocURL: https://docs.adobe.com",
            "Bundle-ManifestVersion: 2",
            "Bundle-Name: GraphQL - API",
            "Bundle-SymbolicName: com.adobe.aem.graphql.api",
            "Bundle-Vendor: Adobe",
            "Bundle-Version: 0.0.1.CQ650-B0004",
            "Created-By: Apache Maven Bundle Plugin",
            "Export-Package: com.adobe.aem.graphql.api; version="1.0.0"; uses:="org.apache.sling.api.resource"",
            "Import-Package: org.apache.sling.api.resource; version="[
              2.12,
              3)"",
              "Include-Resource: META-INF/LICENSE=target/maven-shared-archive-resources/META-INF/LICENSE",
              "Manifest-Version: 1.0",
              "Private-Package: com.adobe.aem.graphql.api",
              "Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=1.8))"",
              "Tool: Bnd-4.2.0.201903051501"
            ]
          },
          {
            key: "nfo",
            value: {
              
            }
          }
        ]
      }
    ]
  }

Cannot be correctly instantiated by the Use API

While working with AEM we face this issue many times where Use API is not correctly instantiated.

Cannot get DefaultSlingScript: Identifier com.jorvee.aem.models.wards.custom.Products cannot be correctly instantiated by the Use API

Exception during response processing

 

*ERROR* [[0:0:0:0:0:0:0:1] [1660926362441] POST /content/rashidjorvee/us/en/ccpa-test-page.html HTTP/1.1] org.apache.sling.servlets.post.impl.operations.ModifyOperation Exception during response processing.
java.lang.IllegalArgumentException: Value for key flt-Action can't be put into node: REQUEST
	at org.apache.sling.jcr.resource.internal.JcrModifiableValueMap.put(JcrModifiableValueMap.java:458) [org.apache.sling.jcr.resource:3.0.22]
	at org.apache.sling.jcr.resource.internal.JcrModifiableValueMap.put(JcrModifiableValueMap.java:47) [org.apache.sling.jcr.resource:3.0.22]
	at org.apache.sling.servlets.post.impl.helper.SlingPropertyValueHandler.store(SlingPropertyValueHandler.java:507) [org.apache.sling.servlets.post:2.4.2]
	at org.apache.sling.servlets.post.impl.helper.SlingPropertyValueHandler.setPropertyAsIs(SlingPropertyValueHandler.java:253) [org.apache.sling.servlets.post:2.4.2]
	at org.apache.sling.servlets.post.impl.helper.SlingPropertyValueHandler.setProperty(SlingPropertyValueHandler.java:120) [org.apache.sling.servlets.post:2.4.2]
	at org.apache.sling.servlets.post.impl.operations.ModifyOperation.writeContent(ModifyOperation.java:372) [org.apache.sling.servlets.post:2.4.2]
	at org.apache.sling.servlets.post.impl.operations.ModifyOperation.doRun(ModifyOperation.java:93) [org.apache.sling.servlets.post:2.4.2]
	at org.apache.sling.servlets.post.impl.operations.AbstractPostOperation.run(AbstractPostOperation.java:105) [org.apache.sling.servlets.post:2.4.2]
	at org.apache.sling.servlets.post.impl.SlingPostServlet.doPost(SlingPostServlet.java:243) [org.apache.sling.servlets.post:2.4.2]
	at org.apache.sling.api.servlets.SlingAllMethodsServlet.mayService(SlingAllMethodsServlet.java:146) [org.apache.sling.api:2.23.6]
	at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:342) [org.apache.sling.api:2.23.6]
	at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:374) [org.apache.sling.api:2.23.6]
	at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:574) [org.apache.sling.engine:2.7.8]
	at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:45) [org.apache.sling.engine:2.7.8]
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:88) [org.apache.sling.engine:2.7.8]
	at com.day.cq.wcm.core.impl.WCMDebugFilter.doFilter(WCMDebugFilter.java:138) [com.day.cq.wcm.cq-wcm-core:5.13.222]
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) [org.apache.sling.engine:2.7.8]
	at com.adobe.granite.metrics.knownerrors.impl.ErrorLoggingComponentFilter.doFilter(ErrorLoggingComponentFilter.java:76) [com.adobe.granite.metrics.knownerrors:0.0.18]
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) [org.apache.sling.engine:2.7.8]
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:84) [org.apache.sling.engine:2.7.8]
	at com.day.cq.wcm.core.impl.WCMComponentFilter.filterRootInclude(WCMComponentFilter.java:375) [com.day.cq.wcm.cq-wcm-core:5.13.222]
	at com.day.cq.wcm.core.impl.WCMComponentFilter.doFilter(WCMComponentFilter.java:190) [com.day.cq.wcm.cq-wcm-core:5.13.222]
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) [org.apache.sling.engine:2.7.8]
	at com.day.cq.wcm.core.impl.page.PageLockFilter.doFilter(PageLockFilter.java:91) [com.day.cq.wcm.cq-wcm-core:5.13.222]
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) [org.apache.sling.engine:2.7.8]
	at com.day.cq.personalization.impl.TargetComponentFilter.doFilter(TargetComponentFilter.java:94) [com.day.cq.cq-personalization:5.13.24]
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) [org.apache.sling.engine:2.7.8]
	at org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:283) [org.apache.sling.engine:2.7.8]
	at org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChain.java:49) [org.apache.sling.engine:2.7.8]
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:82) [org.apache.sling.engine:2.7.8]
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:84) [org.apache.sling.engine:2.7.8]
	at com.day.cq.wcm.core.impl.warp.TimeWarpFilter.doFilter(TimeWarpFilter.java:109) [com.day.cq.wcm.cq-wcm-core:5.13.222]
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) [org.apache.sling.engine:2.7.8]
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:84) [org.apache.sling.engine:2.7.8]
	at com.day.cq.dam.core.impl.assetlinkshare.AdhocAssetShareAuthHandler.doFilter(AdhocAssetShareAuthHandler.java:530) [com.day.cq.dam.cq-dam-core:5.13.302]
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) [org.apache.sling.engine:2.7.8]
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:84) [org.apache.sling.engine:2.7.8]
	at com.day.cq.dam.core.impl.servlet.ActivityRecordHandler.doFilter(ActivityRecordHandler.java:141) [com.day.cq.dam.cq-dam-core:5.13.302]
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) [org.apache.sling.engine:2.7.8]
	at com.adobe.granite.rest.impl.servlet.ApiResourceFilter.doFilter(ApiResourceFilter.java:70) [com.adobe.granite.rest.api:1.1.26]
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) [org.apache.sling.engine:2.7.8]
	at com.adobe.granite.requests.logging.impl.RequestLoggerImpl.doFilter(RequestLoggerImpl.java:135) [com.adobe.granite.requests.logging:1.0.22]
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) [org.apache.sling.engine:2.7.8]
	at com.adobe.granite.rest.assets.impl.AssetContentDispositionFilter.doFilter(AssetContentDispositionFilter.java:96) [com.adobe.granite.rest.assets:1.0.60]
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) [org.apache.sling.engine:2.7.8]
	at com.day.cq.wcm.core.impl.AuthoringUIModeServiceImpl.doFilter(AuthoringUIModeServiceImpl.java:369) [com.day.cq.wcm.cq-wcm-core:5.13.222]
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) [org.apache.sling.engine:2.7.8]
	at com.day.cq.wcm.mobile.core.impl.redirect.RedirectFilter.doFilter(RedirectFilter.java:248) [com.day.cq.wcm.cq-wcm-mobile-core:5.11.10]
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) [org.apache.sling.engine:2.7.8]
	at org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter.doFilter(RequestProgressTrackerLogFilter.java:110) [org.apache.sling.engine:2.7.8]
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) [org.apache.sling.engine:2.7.8]
	at com.day.cq.dam.core.impl.servlet.DisableLegacyServletFilter.executeFilter(DisableLegacyServletFilter.java:197) [com.day.cq.dam.cq-dam-core:5.13.302]
	at com.day.cq.dam.core.impl.servlet.DisableLegacyServletFilter.doFilter(DisableLegacyServletFilter.java:154) [com.day.cq.dam.cq-dam-core:5.13.302]
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) [org.apache.sling.engine:2.7.8]
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:84) [org.apache.sling.engine:2.7.8]
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:84) [org.apache.sling.engine:2.7.8]
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:84) [org.apache.sling.engine:2.7.8]
	at com.day.cq.wcm.foundation.forms.FormsHandlingServletHelper.handleFilter(FormsHandlingServletHelper.java:226) [com.day.cq.wcm.cq-wcm-foundation:5.13.40]
	at com.day.cq.wcm.foundation.forms.impl.FormsHandlingServlet.doFilter(FormsHandlingServlet.java:138) [com.day.cq.wcm.cq-wcm-foundation:5.13.40]
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) [org.apache.sling.engine:2.7.8]
	at com.adobe.granite.optout.impl.OptOutFilter.doFilter(OptOutFilter.java:76) [com.adobe.granite.optout:1.0.0]
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) [org.apache.sling.engine:2.7.8]
	at com.day.cq.wcm.foundation.forms.FormsHandlingServletHelper.handleFilter(FormsHandlingServletHelper.java:226) [com.day.cq.wcm.cq-wcm-foundation:5.13.40]
	at com.adobe.cq.wcm.core.components.internal.servlets.CoreFormHandlingServlet.doFilter(CoreFormHandlingServlet.java:123) [com.adobe.cq.core.wcm.components.core:2.17.2]
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) [org.apache.sling.engine:2.7.8]
	at com.day.cq.wcm.core.impl.WCMRequestFilter.doFilter(WCMRequestFilter.java:90) [com.day.cq.wcm.cq-wcm-core:5.13.222]
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) [org.apache.sling.engine:2.7.8]
	at com.adobe.cq.history.impl.HistoryRequestFilter.doFilter(HistoryRequestFilter.java:111) [com.adobe.cq.cq-history:5.12.2]
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) [org.apache.sling.engine:2.7.8]
	at org.apache.sling.rewriter.impl.RewriterFilter.doFilter(RewriterFilter.java:87) [org.apache.sling.rewriter:1.2.2]
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) [org.apache.sling.engine:2.7.8]
	at com.adobe.granite.httpcache.impl.InnerCacheFilter.doFilter(InnerCacheFilter.java:81) [com.adobe.granite.httpcache.core:1.0.8]
	at com.adobe.granite.httpcache.impl.InnerCacheFilter.doFilter(InnerCacheFilter.java:60) [com.adobe.granite.httpcache.core:1.0.8]
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) [org.apache.sling.engine:2.7.8]
	at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:131) [org.apache.sling.i18n:2.5.14]
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) [org.apache.sling.engine:2.7.8]
	at com.adobe.granite.csrf.impl.CSRFFilter.doFilter(CSRFFilter.java:217) [com.adobe.granite.csrf:1.0.24]
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) [org.apache.sling.engine:2.7.8]
	at org.apache.sling.security.impl.ContentDispositionFilter.doFilter(ContentDispositionFilter.java:154) [org.apache.sling.security:1.1.20]
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) [org.apache.sling.engine:2.7.8]
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:84) [org.apache.sling.engine:2.7.8]
	at com.adobe.granite.resourceresolverhelper.impl.ResourceResolverHelperImpl.doFilter(ResourceResolverHelperImpl.java:83) [com.adobe.granite.resourceresolverhelper:1.0.4]
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) [org.apache.sling.engine:2.7.8]
	at org.apache.sling.engine.impl.SlingRequestProcessorImpl.doProcessRequest(SlingRequestProcessorImpl.java:151) [org.apache.sling.engine:2.7.8]
	at org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:250) [org.apache.sling.engine:2.7.8]
	at org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:123) [org.apache.felix.http.jetty:4.1.10]
	at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:86) [org.apache.felix.http.jetty:4.1.10]
	at com.adobe.granite.metrics.knownerrors.impl.ReportingRequestFilter.doFilter(ReportingRequestFilter.java:85) [com.adobe.granite.metrics.knownerrors:0.0.18]
	at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:142) [org.apache.felix.http.jetty:4.1.10]
	at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:81) [org.apache.felix.http.jetty:4.1.10]
	at com.adobe.granite.cors.impl.CORSFilter.doFilter(CORSFilter.java:87) [com.adobe.granite.cors:1.0.18]
	at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:142) [org.apache.felix.http.jetty:4.1.10]
	at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:81) [org.apache.felix.http.jetty:4.1.10]
	at com.adobe.granite.license.impl.http.LicenseCheckFilter.doFilter(LicenseCheckFilter.java:301) [com.adobe.granite.license.http:1.0.0]
	at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:142) [org.apache.felix.http.jetty:4.1.10]
	at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:81) [org.apache.felix.http.jetty:4.1.10]
	at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:131) [org.apache.sling.i18n:2.5.14]
	at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:142) [org.apache.felix.http.jetty:4.1.10]
	at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:81) [org.apache.felix.http.jetty:4.1.10]
	at org.apache.sling.featureflags.impl.FeatureManager.doFilter(FeatureManager.java:116) [org.apache.sling.featureflags:1.2.2]
	at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:142) [org.apache.felix.http.jetty:4.1.10]
	at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:81) [org.apache.felix.http.jetty:4.1.10]
	at org.apache.sling.engine.impl.log.RequestLoggerFilter.doFilter(RequestLoggerFilter.java:75) [org.apache.sling.engine:2.7.8]
	at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:142) [org.apache.felix.http.jetty:4.1.10]
	at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:81) [org.apache.felix.http.jetty:4.1.10]
	at org.apache.sling.engine.impl.parameters.RequestParameterSupportConfigurer.doFilter(RequestParameterSupportConfigurer.java:67) [org.apache.sling.engine:2.7.8]
	at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:142) [org.apache.felix.http.jetty:4.1.10]
	at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:81) [org.apache.felix.http.jetty:4.1.10]
	at org.apache.felix.http.base.internal.dispatch.Dispatcher$1.doFilter(Dispatcher.java:146) [org.apache.felix.http.jetty:4.1.10]
	at org.apache.felix.http.base.internal.whiteboard.WhiteboardManager$2.doFilter(WhiteboardManager.java:1002) [org.apache.felix.http.jetty:4.1.10]
	at com.adobe.granite.cors.impl.CORSFilter.doFilter(CORSFilter.java:87) [com.adobe.granite.cors:1.0.18]
	at org.apache.felix.http.base.internal.handler.PreprocessorHandler.handle(PreprocessorHandler.java:137) [org.apache.felix.http.jetty:4.1.10]
	at org.apache.felix.http.base.internal.whiteboard.WhiteboardManager$2.doFilter(WhiteboardManager.java:1008) [org.apache.felix.http.jetty:4.1.10]
	at com.adobe.granite.auth.oauth.impl.OAuthCallbackFilter.doFilter(OAuthCallbackFilter.java:69) [com.adobe.granite.auth.oauth:1.7.10]
	at org.apache.felix.http.base.internal.handler.PreprocessorHandler.handle(PreprocessorHandler.java:137) [org.apache.felix.http.jetty:4.1.10]
	at org.apache.felix.http.base.internal.whiteboard.WhiteboardManager$2.doFilter(WhiteboardManager.java:1008) [org.apache.felix.http.jetty:4.1.10]
	at org.apache.sling.security.impl.ReferrerFilter.doFilter(ReferrerFilter.java:326) [org.apache.sling.security:1.1.20]
	at org.apache.felix.http.base.internal.handler.PreprocessorHandler.handle(PreprocessorHandler.java:137) [org.apache.felix.http.jetty:4.1.10]
	at org.apache.felix.http.base.internal.whiteboard.WhiteboardManager$2.doFilter(WhiteboardManager.java:1008) [org.apache.felix.http.jetty:4.1.10]
	at org.apache.felix.http.sslfilter.internal.SslFilter.doFilter(SslFilter.java:97) [org.apache.felix.http.sslfilter:1.2.6]
	at org.apache.felix.http.base.internal.handler.PreprocessorHandler.handle(PreprocessorHandler.java:137) [org.apache.felix.http.jetty:4.1.10]
	at org.apache.felix.http.base.internal.whiteboard.WhiteboardManager$2.doFilter(WhiteboardManager.java:1008) [org.apache.felix.http.jetty:4.1.10]
	at org.apache.felix.http.base.internal.whiteboard.WhiteboardManager.invokePreprocessors(WhiteboardManager.java:1012) [org.apache.felix.http.jetty:4.1.10]
	at org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:91) [org.apache.felix.http.jetty:4.1.10]
	at org.apache.felix.http.base.internal.dispatch.DispatcherServlet.service(DispatcherServlet.java:49) [org.apache.felix.http.jetty:4.1.10]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:733) [org.apache.felix.http.servlet-api:1.1.4]
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799) [org.apache.felix.http.jetty:4.1.10]
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:550) [org.apache.felix.http.jetty:4.1.10]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) [org.apache.felix.http.jetty:4.1.10]
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624) [org.apache.felix.http.jetty:4.1.10]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) [org.apache.felix.http.jetty:4.1.10]
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1435) [org.apache.felix.http.jetty:4.1.10]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) [org.apache.felix.http.jetty:4.1.10]
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501) [org.apache.felix.http.jetty:4.1.10]
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594) [org.apache.felix.http.jetty:4.1.10]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) [org.apache.felix.http.jetty:4.1.10]
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1350) [org.apache.felix.http.jetty:4.1.10]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [org.apache.felix.http.jetty:4.1.10]
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:191) [org.apache.felix.http.jetty:4.1.10]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) [org.apache.felix.http.jetty:4.1.10]
	at org.eclipse.jetty.server.Server.handle(Server.java:516) [org.apache.felix.http.jetty:4.1.10]
	at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388) [org.apache.felix.http.jetty:4.1.10]
	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633) [org.apache.felix.http.jetty:4.1.10]
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380) [org.apache.felix.http.jetty:4.1.10]
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277) [org.apache.felix.http.jetty:4.1.10]
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) [org.apache.felix.http.jetty:4.1.10]
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) [org.apache.felix.http.jetty:4.1.10]
	at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) [org.apache.felix.http.jetty:4.1.10]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338) [org.apache.felix.http.jetty:4.1.10]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315) [org.apache.felix.http.jetty:4.1.10]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173) [org.apache.felix.http.jetty:4.1.10]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131) [org.apache.felix.http.jetty:4.1.10]
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:383) [org.apache.felix.http.jetty:4.1.10]
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:882) [org.apache.felix.http.jetty:4.1.10]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1036) [org.apache.felix.http.jetty:4.1.10]
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: javax.jcr.nodetype.ConstraintViolationException: No matching property definition: flt-Action = REQUEST
	at org.apache.jackrabbit.oak.jcr.delegate.NodeDelegate.setProperty(NodeDelegate.java:519) [org.apache.jackrabbit.oak-jcr:1.40.0.T20210715153437-563b834]
	at org.apache.jackrabbit.oak.jcr.session.NodeImpl$36.perform(NodeImpl.java:1403) [org.apache.jackrabbit.oak-jcr:1.40.0.T20210715153437-563b834]
	at org.apache.jackrabbit.oak.jcr.session.NodeImpl$36.perform(NodeImpl.java:1390) [org.apache.jackrabbit.oak-jcr:1.40.0.T20210715153437-563b834]
	at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.perform(SessionDelegate.java:209) [org.apache.jackrabbit.oak-jcr:1.40.0.T20210715153437-563b834]
	at org.apache.jackrabbit.oak.jcr.session.ItemImpl.perform(ItemImpl.java:112) [org.apache.jackrabbit.oak-jcr:1.40.0.T20210715153437-563b834]
	at org.apache.jackrabbit.oak.jcr.session.NodeImpl.internalSetProperty(NodeImpl.java:1390) [org.apache.jackrabbit.oak-jcr:1.40.0.T20210715153437-563b834]
	at org.apache.jackrabbit.oak.jcr.session.NodeImpl.setProperty(NodeImpl.java:368) [org.apache.jackrabbit.oak-jcr:1.40.0.T20210715153437-563b834]
	at org.apache.sling.jcr.resource.internal.JcrModifiableValueMap.put(JcrModifiableValueMap.java:455) [org.apache.sling.jcr.resource:3.0.22]
	... 155 common frames omitted

Exception: Opening Stacktrace


*INFO* [Apache Sling Resource Resolver Finalizer Thread] org.apache.sling.resourceresolver.impl.CommonResourceResolverFactoryImpl Unclosed ResourceResolver was created here: 
java.lang.Exception: Opening Stacktrace
	at org.apache.sling.resourceresolver.impl.CommonResourceResolverFactoryImpl$ResolverReference.<init>(CommonResourceResolverFactoryImpl.java:538) [org.apache.sling.resourceresolver:1.7.8]
	at org.apache.sling.resourceresolver.impl.CommonResourceResolverFactoryImpl.register(CommonResourceResolverFactoryImpl.java:228) [org.apache.sling.resourceresolver:1.7.8]
	at org.apache.sling.resourceresolver.impl.ResourceResolverImpl.<init>(ResourceResolverImpl.java:110) [org.apache.sling.resourceresolver:1.7.8]
	at org.apache.sling.resourceresolver.impl.ResourceResolverImpl.<init>(ResourceResolverImpl.java:103) [org.apache.sling.resourceresolver:1.7.8]
	at org.apache.sling.resourceresolver.impl.CommonResourceResolverFactoryImpl.getResourceResolverInternal(CommonResourceResolverFactoryImpl.java:273) [org.apache.sling.resourceresolver:1.7.8]
	at org.apache.sling.resourceresolver.impl.ResourceResolverFactoryImpl.getServiceResourceResolver(ResourceResolverFactoryImpl.java:89) [org.apache.sling.resourceresolver:1.7.8]
	at com.day.cq.personalization.impl.omnisearch.ActivitiesOmnisearchHandler.getResourceResolver(ActivitiesOmnisearchHandler.java:84) [com.day.cq.cq-personalization:5.13.24]
	at com.day.cq.personalization.impl.omnisearch.ActivitiesOmnisearchHandler.deactivate(ActivitiesOmnisearchHandler.java:129) [com.day.cq.cq-personalization:5.13.24]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.apache.felix.scr.impl.inject.methods.BaseMethod.invokeMethod(BaseMethod.java:244) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.inject.methods.BaseMethod.access$500(BaseMethod.java:41) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.inject.methods.BaseMethod$Resolved.invoke(BaseMethod.java:685) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.inject.methods.BaseMethod.invoke(BaseMethod.java:529) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke(ActivateMethod.java:318) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke(ActivateMethod.java:308) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.manager.SingleComponentManager.disposeImplementationObject(SingleComponentManager.java:421) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.manager.SingleComponentManager.deleteComponent(SingleComponentManager.java:165) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.manager.SingleComponentManager.ungetService(SingleComponentManager.java:1041) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.framework.ServiceRegistrationImpl.ungetFactoryUnchecked(ServiceRegistrationImpl.java:393)
	at org.apache.felix.framework.ServiceRegistrationImpl.ungetService(ServiceRegistrationImpl.java:288)
	at org.apache.felix.framework.ServiceRegistry.ungetService(ServiceRegistry.java:517)
	at org.apache.felix.framework.ServiceRegistry.ungetServices(ServiceRegistry.java:202)
	at org.apache.felix.framework.ServiceRegistry.unregisterService(ServiceRegistry.java:183)
	at org.apache.felix.framework.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:146)
	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.unregister(AbstractComponentManager.java:952) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.unregister(AbstractComponentManager.java:915) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:140) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.manager.AbstractComponentManager.unregisterService(AbstractComponentManager.java:994) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.manager.AbstractComponentManager.doDeactivate(AbstractComponentManager.java:844) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.manager.AbstractComponentManager.deactivateInternal(AbstractComponentManager.java:825) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.manager.DependencyManager.deactivateComponentManager(DependencyManager.java:2580) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.manager.DependencyManager.access$400(DependencyManager.java:59) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.removedService(DependencyManager.java:1353) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.removedService(DependencyManager.java:1222) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:1226) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:1121) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.untrack(ServiceTracker.java:981) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1160) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:114) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.framework.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:990)
	at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:838)
	at org.apache.felix.framework.EventDispatcher.fireServiceEvent(EventDispatcher.java:545)
	at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4863)
	at org.apache.felix.framework.Felix.access$000(Felix.java:111)
	at org.apache.felix.framework.Felix$1.serviceChanged(Felix.java:440)
	at org.apache.felix.framework.ServiceRegistry.unregisterService(ServiceRegistry.java:170)
	at org.apache.felix.framework.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:146)
	at org.apache.sling.resourceresolver.impl.ResourceResolverFactoryActivator.unregisterFactory(ResourceResolverFactoryActivator.java:494) [org.apache.sling.resourceresolver:1.7.8]
	at org.apache.sling.resourceresolver.impl.ResourceResolverFactoryActivator.unregisterFactory(ResourceResolverFactoryActivator.java:485) [org.apache.sling.resourceresolver:1.7.8]
	at org.apache.sling.resourceresolver.impl.ResourceResolverFactoryActivator.access$200(ResourceResolverFactoryActivator.java:68) [org.apache.sling.resourceresolver:1.7.8]
	at org.apache.sling.resourceresolver.impl.ResourceResolverFactoryActivator$1.providerRemoved(ResourceResolverFactoryActivator.java:425) [org.apache.sling.resourceresolver:1.7.8]
	at org.apache.sling.resourceresolver.impl.providers.ResourceProviderTracker.unregister(ResourceProviderTracker.java:290) [org.apache.sling.resourceresolver:1.7.8]
	at org.apache.sling.resourceresolver.impl.providers.ResourceProviderTracker.access$100(ResourceProviderTracker.java:59) [org.apache.sling.resourceresolver:1.7.8]
	at org.apache.sling.resourceresolver.impl.providers.ResourceProviderTracker$1.removedService(ResourceProviderTracker.java:116) [org.apache.sling.resourceresolver:1.7.8]
	at org.apache.sling.resourceresolver.impl.providers.ResourceProviderTracker$1.removedService(ResourceProviderTracker.java:106) [org.apache.sling.resourceresolver:1.7.8]
	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:970)
	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:872)
	at org.osgi.util.tracker.AbstractTracked.untrack(AbstractTracked.java:341)
	at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:912)
	at org.apache.felix.framework.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:990)
	at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:838)
	at org.apache.felix.framework.EventDispatcher.fireServiceEvent(EventDispatcher.java:545)
	at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4863)
	at org.apache.felix.framework.Felix.access$000(Felix.java:111)
	at org.apache.felix.framework.Felix$1.serviceChanged(Felix.java:440)
	at org.apache.felix.framework.ServiceRegistry.unregisterService(ServiceRegistry.java:170)
	at org.apache.felix.framework.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:146)
	at org.apache.sling.resourceresolver.impl.legacy.LegacyResourceProviderWhiteboard.unbindResourceProviderFactory(LegacyResourceProviderWhiteboard.java:163) [org.apache.sling.resourceresolver:1.7.8]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.apache.felix.scr.impl.inject.methods.BaseMethod.invokeMethod(BaseMethod.java:244) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.inject.methods.BaseMethod.access$500(BaseMethod.java:41) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.inject.methods.BaseMethod$Resolved.invoke(BaseMethod.java:685) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.inject.methods.BaseMethod.invoke(BaseMethod.java:529) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.inject.methods.BindMethod.invoke(BindMethod.java:42) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.manager.DependencyManager.invokeUnbindMethod(DependencyManager.java:2209) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.manager.SingleComponentManager.invokeUnbindMethod(SingleComponentManager.java:466) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.removedService(DependencyManager.java:395) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.removedService(DependencyManager.java:301) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:1226) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:1121) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.untrack(ServiceTracker.java:981) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1160) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:114) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.framework.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:990)
	at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:838)
	at org.apache.felix.framework.EventDispatcher.fireServiceEvent(EventDispatcher.java:545)
	at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4863)
	at org.apache.felix.framework.Felix.access$000(Felix.java:111)
	at org.apache.felix.framework.Felix$1.serviceChanged(Felix.java:440)
	at org.apache.felix.framework.ServiceRegistry.unregisterService(ServiceRegistry.java:170)
	at org.apache.felix.framework.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:146)
	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.unregister(AbstractComponentManager.java:952) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.unregister(AbstractComponentManager.java:915) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:140) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.manager.AbstractComponentManager.unregisterService(AbstractComponentManager.java:994) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.manager.AbstractComponentManager.doDeactivate(AbstractComponentManager.java:844) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.manager.AbstractComponentManager.deactivateInternal(AbstractComponentManager.java:825) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.manager.AbstractComponentManager.dispose(AbstractComponentManager.java:589) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.disposeComponents(ConfigurableComponentHolder.java:718) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.BundleComponentActivator.dispose(BundleComponentActivator.java:487) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.Activator.disposeComponents(Activator.java:613) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.Activator.access$300(Activator.java:70) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.Activator$ScrExtension.destroy(Activator.java:451) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.AbstractExtender$1.run(AbstractExtender.java:216) [org.apache.felix.scr:2.1.26]
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at org.apache.felix.scr.impl.AbstractExtender.destroyExtension(AbstractExtender.java:238) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.AbstractExtender.bundleChanged(AbstractExtender.java:132) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.scr.impl.Activator.bundleChanged(Activator.java:217) [org.apache.felix.scr:2.1.26]
	at org.apache.felix.framework.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:915)
	at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:834)
	at org.apache.felix.framework.EventDispatcher.fireBundleEvent(EventDispatcher.java:516)
	at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4847)
	at org.apache.felix.framework.Felix.stopBundle(Felix.java:2812)
	at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1584)
	at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
	at java.base/java.lang.Thread.run(Thread.java:834)

Refused to load the script

Content-security-policy deny the script from third-party system, but few third-party application and system needs to be allow so that we can use their libraries in our web application. In this case since the content security policy blocked all script hence our application is unable to load any library from cdn.tiny.cloud host. Lets see the error ans solution in detail.

Error

Refused to load the script 'https://cdn.tiny.cloud/1/rashidjorvee/tinymce/6/tinymce.min.js' because it violates the following Content Security Policy directive: "script-src blob: data: 'unsafe-inline' 'unsafe-eval' 'self' rashidjorvee.com adobeaemcloud.com". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.

Solution 

Using dispatcher config we can solve this by adding content-security-policy and allow that domain.


<IfModule mod_headers.c>
    Header add X-Vhost "publish"
    Header always set X-XSS-Protection "1; mode=block"
    Header always set content-security-policy "script-src blob: data: 'unsafe-inline' 'unsafe-eval' 'self' *.tiny.cloud *.adobeaemcloud.com
</IfModule>



AEM Environment Variables | AEM as Cloud Service

The Adobe I/O CLI plays an integral role in development on AEM as a Cloud Service as it provides developers the ability to manage Cloud Manager environment & pipeline variables from the CLI

Pipeline Variables

Your build process may depend upon specific configuration variables which would be inappropriate to place in the git repository or you may need to vary them between pipeline executions using the same branch.

Cloud Manager allows for these variables to be configured through the Cloud Manager API or Cloud Manager CLI on a per-pipeline basis. Variables may be stored as either plain text or encrypted at rest. In either case, variables are made available inside the build environment as an environment variable which can then be referenced from inside the pom.xml file or other build scripts.

Uses example

  • Used to vary behavior of build process
  • Accessible inside the build process
  • Dev minification is set differently on Dev vs Stage or Prod
  • Disable caching on Dev

Standard Environment Variables

Changing application behavior based on standard environment variables

Uses example:

  • Provided to the runtime environment
  • Used in OSGi configuration
  • Store passwords outside of version control, instead use a reference.
  • Connect your AEM application with different external endpoints

Types of environment variables

  1. Inline values. e.g. { "keyName" : "jorvee" }
  2. Environment specific values. e.g. { "endpoint" : "$[env:JORVEE_ENDPOINT]" }
  3. Environment secrets. e.g. { "authToken" : "$[secret:J_AUTH_TOKEN]" }


Variable naming conventions

  • Variable names must observe the following conventions.
  • Variables may only contain alphanumeric characters and the underscore (_).
  • The names should be all upper-case.
  • There is a limit of 200 variables per pipeline.
  • Each name must be less than 100 characters.
  • Each string variable value must be less than 2048 characters.
  • Each secretString type variable value must be less than 500 characters.

References:

How to install .FAR file in AEM

DOT FAR file is the Sling Feature Archive file, that work as a AEM package but we cant upload and install .far file using AEM package manager. To install the .far file in AEM we have to follow the following steps.

Steps to Install .far file in AEM

  1. Go to aem-quickstart folder. If you are setting the new aem then quickstart folder you will get once you unzip the aem jar file or run the jar file first time.
  2. Create a folder with name "install" under crx-quickstart.
  3. Add .far file into install folder.
  4. Now run the AEM jar again. If AEM is running first stop and then start again.

Service-Component entry can not be located in JAR: OSGI-INF

We might come to this issue while building the AEM code. The issue is with the @compoennt properties or the definition given for the file. In most of the cases error "Service-Component entry can not be located in JAR: OSGI-INF" says, that the @component name property which we are trying to give here is a duplicate and that name has been already given to a class, hence this name can not be accepted for a new component because it causes the unnecessary conflict between two components, and difficult to generate the meta-type or metadata, and manage the OSGi component.


[ERROR] Bundle com.rashid.aem.bundles:servlets:bundle:1.0.0-SNAPSHOT : Service-Component entry can not be located in JAR: OSGI-INF/com.rashid.aem.servlets.MobileAppImageServlet.xml~

[ERROR] Error(s) found in bundle configuration


Resolution

Update the name property value under @component annotation.


Example:

@Component( immediate = true,
service = Servlet.
class,
name =
"com.rashid.aem.servlets.GetAllImageServlet",
property = {
"sling.servlet.selectors=mobileapp",
"sling.servlet.extensions=json",
"sling.servlet.methods=GET",
"sling.servlet.paths=/bin/getAllImages"})

Verbose option not active, closing stdin and redirecting stdout and stderr

We experience this issue at the time of running the AEM jar file. Everything is fine or even using a valid command we are unable to start the AEM service then look and follow.

Error:

java -jar aem-sdk-quickstart-author-p4502.jar -debug 30303
Loading quickstart properties: default
Loading quickstart properties: instance
Low-memory action set to fork
Using 64bit VM settings, min.heap=1024MB, min permgen=256MB, default fork arguments=[-Xmx1024m, -XX:MaxPermSize=256m]
The JVM reports a heap size of 4014 MB, meets our expectation of 1024 MB +/- 20
Debugging requested on port 30303, forcing fork
Preparing to fork JVM, OS name=Windows 10, isWindows=true
Forking JVM: [C:\Program Files\Java\jdk-11.0.15\bin\java.exe, -agentlib:jdwp=transport=dt_socket,address=30303,server=y,suspend=n, -Xmx1024m, -XX:MaxPermSize=256m, -jar, C:/Users/mohammad_r/Downloads/aem-sdk/aem-sdk-quickstart-author-p4502.jar, -nofork, -pt, CHILD]
Java HotSpot(TM) 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0
Listening for transport dt_socket at address: 30303
Loading quickstart properties: default
Loading quickstart properties: instance
Low-memory action set to fork
Using 64bit VM settings, min.heap=1024MB, min permgen=256MB, default fork arguments=[-Xmx1024m, -XX:MaxPermSize=256m]
The JVM reports a heap size of 1024 MB, meets our expectation of 1024 MB +/- 20
Setting properties from filename 'C:/Users/jorvee/Downloads/aem-sdk/aem-sdk-quickstart-author-p4502.jar'
Option '-quickstart.server.port' set to '4502' from filename aem-sdk-quickstart-author-p4502.jar
Verbose option not active, closing stdin and redirecting stdout and stderr
Redirecting stdout to C:\Users\jorvee\Downloads\aem-sdk\crx-quickstart\logs\stdout.log
Redirecting stderr to C:\Users\jorvee\Downloads\aem-sdk\crx-quickstart\logs\stderr.log
Forked JVM process exited with exit code 1
Main JVM process exiting
MAIN process: shutdown hook
MAIN process: exiting

Log file stderr

Low-memory action set to fork
Using 64bit VM settings, min.heap=1024MB, min permgen=256MB, default fork arguments=[-Xmx1024m, -XX:MaxPermSize=256m]
The JVM reports a heap size of 1024 MB, meets our expectation of 1024 MB +/- 20
Setting properties from filename 'C:/Users/mohammad_r/Downloads/aem-sdk/aem-sdk-quickstart-author-p4502.jar'
Option '-quickstart.server.port' set to '4502' from filename aem-sdk-quickstart-author-p4502.jar
Verbose option not active, closing stdin and redirecting stdout and stderr
Redirecting stdout to C:\Users\jorvee\Downloads\aem-sdk\crx-quickstart\logs\stdout.log
Redirecting stderr to C:\Users\jorvee\Downloads\aem-sdk\crx-quickstart\logs\stderr.log
ResourceProvider paths=[/gui, /gui/default]
java.io.IOException: Did not find an available server port, tried 4502
at com.adobe.granite.quickstart.base.impl.exec.PortSelector.selectPort(PortSelector.java:74)
at com.adobe.granite.quickstart.base.impl.Quickstart.<init>(Quickstart.java:147)
at com.adobe.granite.quickstart.base.impl.Main.<init>(Main.java:911)
at com.adobe.granite.quickstart.base.impl.Main.main(Main.java:980)
Quickstart: aborting
CHILD process: shutdown hook
CHILD process: exiting

Resolution

Port 4502 is not available and is being consumed by any other service.

AEM service unsatisfied

When you see your AEM service and servlet is showing in state unsatisfied. Then click on the class name and see the detail, on the OSGi console that what causing this issue and which reference is unsatisfied.

Unsatisfied
Service Name: org.apache.sling.api.resource.ResourceResolver
Cardinality: 1..1
Policy: static
Policy Option: reluctant
No Services bound


ResourceResolver is not satisfied or the way of creating ResourceResolver object is not correct.


Policy Option

RELUCTANT
          The reluctant policy option is the default policy option for both static and dynamic reference policies.


References

1. Reference Policy Option