Friday, August 19, 2016

How to invalidate the dispatcher cache for dam assets referred from multiple sites? - Adobe CQ5/AEM

How to invalidate the dispatcher cache for dam assets referred from multiple sites? - Adobe CQ5/AEM

Sometimes, we may have the scenario like the same DAM asset is referred from multiple sites and cached locally(site specific) in Adobe Experience Manager(AEM) dispatcher for the different sites. The local cache of the different sites should be invalidated whenever the asset is modified.

This post will explain how to achieve the above mentioned scenario.

Create a user in all the publisher and provide only the access to DAM- /content/dam


Create a flush agent for individual sites with the following details in all the publishers(repeat the below step for all the sites)



Friday, July 8, 2016

How to populate the current page path to the dialog through EXT JS - Adobe Experience Manager(AEM) 6.1

This post will explain, how to populate the current page path to the dialog through EXT JS - Adobe Experience Manager(AEM ) 6.1

Add the listener for the widget and use the below script.

function(widget) {
        var currentPath;
if(CQ.wcm.SiteAdmin.hasListSelection()) {
        var grid = CQ.wcm.SiteAdmin.getActiveGrid();
        var selections = grid.getSelectionModel().getSelections();
currentPath = selections[0].id;
console.log(currentPath);
widget.setValue(currentPath)
}
}







Thursday, June 23, 2016

Caused by: org.apache.sling.api.resource.PersistenceException: Resource is not modifiable - Adobe CQ5/AEM

 Caused by: org.apache.sling.api.resource.PersistenceException: Resource is not modifiable - Adobe CQ5/AEM


The below exception will be thrown most of the cases while accessing the servlet with post from Adobe Experience Manager(AEM).

The actual issue is Adobe Experience Manager(AEM) could not ale to resolve the servlet and assumes it as a resource path but this is not a valid resource path, the below exception will be thrown when AEM tries to set the property values.

Caused by: org.apache.sling.api.resource.PersistenceException: Resource at '/services/formservlet' is not modifiable.
    at org.apache.sling.servlets.post.impl.helper.SlingPropertyValueHandler.setProperty(SlingPropertyValueHandler.java:153)
    at org.apache.sling.servlets.post.impl.operations.ModifyOperation.writeContent(ModifyOperation.java:411)
    at org.apache.sling.servlets.post.impl.operations.ModifyOperation.doRun(ModifyOperation.java:101)

The steps to narrow down the issue:

Resolve the Servlet:

Go to http://<<AEM Host>>:4503/system/console/configMgr - Sling--> Sling Servlet Resolver and resolve the servlet path, if the servlet path is resolved then there is no issue if not the servlet is not configured properly.

Path resolved to a Servlet




Tuesday, June 21, 2016

Dispatcher Cache Invalidation for Multi Site Configuration - Adobe CQ5(AEM)

Dispatcher Cache Invalidation for Multi Site Configuration - Adobe CQ5(AEM)

This post will explain the approach to invalidate the cache for particular site in multi site configuration - Adobe CQ5(AEM).

Recently, i was working on a dispatcher caching issue with multi site configuration - The cache was not getting invalidated in all the dispatcher.

The setup is with multiple dispatcher connected via load balancer. The load balancer will route the request to individual dispatchers via round robin algorithm. The dispatcher is configured with individual virtual host and farm for every site(Load balanced DNS is used).

The flush agent was configured in publisher for every site with load balanced DNS(the flush agent was equal to number of sites configured in dispatcher) - The issue here is when ever publisher send the invalidation request that is not reaching the corresponding dispatcher as the flush agent is configured with load balanced DNS for invalidation URI - The request will be send to random dispatcher from the load balancer due to this the cache will not be invalidated in all the dispatcher.

Solution:

Create a flush agent in individual publisher that points to individual dispatcher(based on the renders configuration). The flush agent should be configured with dispatchers server name(one flush agent in one publisher)

http://dispatcher1.server.name:80/dispatcher/invalidate.cache




Sunday, June 19, 2016

Query the pages with the properties of child node - Adobe CQ5/AEM

Query the pages with the properties of child node - Adobe CQ5/AEM

SELECT * FROM [cq:Page] AS page WHERE ISDESCENDANTNODE(page ,"<<Parent folder of pages>>")  AND [jcr:content/<<child node name>>/<<child node property>>]=<<value>>

e.g

SELECT * FROM [cq:Page] AS page WHERE ISDESCENDANTNODE(page ,"/content")  AND [jcr:content/test_node/test_property=test

http://<<AEM Host>>:<<AEM Port>>/crx/explorer/ui/search.jsp - Paste the query and click on Search Now.


Monday, May 30, 2016

Integration of Jenkins server with GIT Hub

Integration of Jenkins server with GIT Hub

We are having multiple blogs around this but could not able to find the complete information on this.

Thought of sharing this for my reference too. This post will explain how to integrate Jenkins in Linux with private GIT Hub.

Configuring the GIT plugin in Jenkins:

Jenkins à Manage Jenkins à Manage Plugins
Make sure Jenkins GIT Client Plugin and Jenkins GIT plugins are installed.


Configure GIT in server:

Login to Jenkins server via puty
Execute the following command - sudo yum install git-all

Configure GIT executable path:

Jenkins àMange JenkinsàConfigure System
Enter the git executable path(git installed to the server in previous step)
My case the path is /usr/bin/git, change accordingly


SSH Configuration:

Login to Jenkins server via putty
Execute the following commad - sudo -u jenkins ssh-keygen -t rsa
Enter the details accordingly, Passphrase is optional if required then enter some string.
This will create private and public keys under /var/lib/jenkins/.ssh (default files are id_rsa and id_rsa.pub)



Friday, April 29, 2016

Only a type can be imported. xxxxxx resolves to a package - AEM/Adobe CQ5

Only a type can be imported. xxxxxx resolves to a package - AEM/Adobe CQ5

We were receiving the following error in run time due to this the pages got broken. The same scenario was working fine earlier and broken without any code or config change to the server.

We have tried multiple options as follows without any luck
  • Re-deploying the code to affected server
  • Restarting the server
  • Removing run time class files - /var/classes/org/apache
  • Recompile/Clear the JSP classes - http://www.albinsblog.com/2016/04/how-to-clearrecompile-jsp-classes-in-AEM-6.1.html
We could not able to identify the root cause but as a work around manually added a space to the component and saved through CRXDE and that helped to fix the issue.


How to disable the online compaction - AEM/Adobe CQ5

How to disable the online compaction - AEM/Adobe CQ5

Adobe Experience Manager(AEM) 6.1 will have daily job scheduled and that will perform the online compaction.

Some times this may cause performance issue when the online compaction takes more time to complete due to load or authoring.

As a solution the online compaction job can be disabled and offline compaction can be used whenever required based on the maintenance window.

Steps to disable online compaction:

  •  Go to CRXDE path - /libs/granite/operations/config/maintenance/granite:daily/granite:RevisionGC
  • Changed run mode from crx3 to crx3-disabled
  • Save


Thursday, April 28, 2016

java.util.concurrent.ExecutionException: hudson.util.IOException2: Failed to create a temporary file in xxxxx/figerprints/2c/73

java.util.concurrent.ExecutionException: hudson.util.IOException2: Failed to create a temporary file in xxxxx/figerprints/2c/73

We were receiving the following exception while executing the deployment jobs from Jenkins

java.util.concurrent.ExecutionException: hudson.util.IOException2: Failed to create a temporary file in xxxxx/figerprints/2c/73



Based on the analysis, the issue happened due to in sufficient space in the server.


The deployment got success after freeing some space in the server.


Friday, April 22, 2016

How to modify the scheduler time for daily and weekly maintenance jobs - Adobe Experience Manager(AEM) 6.1?

How to modify the scheduler time for daily and weekly maintenance jobs - Adobe Experience Manager(AEM) 6.1?

This post will explain the steps to modify the scheduler time for daily and weekly maintenance jobs in Adobe Experience Manager(AEM) 6.1.

To change the scheduled time of the jobs:

Login to CRXDE and navigate to /libs/granite/operations/config/maintenance/granite:weekly or /libs/granite/operations/config/maintenance/granite:daily

Change the windowStartTime and windowEndTime accordingly to change the schedule time of the job.




Thursday, April 14, 2016

How to manage the i18 translation in Adobe CQ5 (AEM)

How to manage the i18 translation in Adobe CQ5 (AEM)

This post will explain how to manage the i18 translation in Adobe CQ5 (AEM)

Follow the below URL to create the i18 language nodes for first time.

The translator.html can be used to manage the i18 translation for different languages.


Here you can add/delete modify keys and language values.

Whenever we perform any operation the same can be viewed from CRXDE – under the language node created as part of the first step.



Wednesday, April 6, 2016

How to restrict crawling/indexing of specific URLs in Adobe Search and Promote(Adobe S&P)

How to restrict crawling/indexing of specific URLs in Adobe Search and Promote(Adobe S&P)

Some cases we may need to index specific type of URLs from the website and excluding all other URLs available.

The URL Masks can be used in Adobe S&P to achieve this.

URL mask will help us to define the rules to include or exclude the specific URLs during the indexing.

We will be able to define include and exclude rules

Include - pattern that specifies the URLs will be indexed
Exclude - pattern that specifies the URLs will be excluded from the indexing.

To index the URLs that is starting with mask.


The crawler will index all the URLs that starts with https://server.com/content/doc