Ask Me ?

Hi Readers,

Here you may comment all the questions/ doubts which you encountered during your journey for AEM. I will try my best to help you out and might connect with you to solve them too.

Also you may post interesting questions which you went through during your respective interviews , and I will try to answer them and thereby increase the Question Bank for masses.

So go ahead and post the questions !!

Thanks a lot .


703 thoughts on “Ask Me ?

  1. Hi Hashim,

    We have a requirement where the links on blueprint needs to be updated for proper locale link in live copy.

    We created the DAM assets structure similar to site structure and placed similar PDF for “en” and “es” locale. Currently only two locales (English and Spanish).

    {/content/dam/testdemo/en and /content/dam/testdemo/es}

    I created a page with text “Click here” and added hyperlink for PDF from en folder. When live copy is created, the link still points to PDF from en folder.

    Page hierarchy (Blueprint): /content/testdemo/en/toolbar/testlink

    Live copy: /content/testdemo/es/testlink

    Requirement is that in live copy (in es folder) link should automatically update to point to similar PDF from es folder.

    Is this OOTB? then please help the configuration required. I used “Standard rollout config” while creating the live copy.

    If customization is needed, please guide with approach. Any links for examples with be appreciated.



  2. Hi All,

    I have one query please help me out..

    Project–>components–>content–>components(demo)–>dialog–>item–>(properties–name–./header) for the xtype -> textfield we can fetch the value in jsp through below code.

    but when we use same processes for xtype–> multicompositefield then the same code is not working

    so pls let me know the code or tips for fetch the multicompositefield value in jsp page.


    • Hi, I couldn’t see what code you are using. But you can debug this easily – do check how the property is getting saved in multi-field . It should be different from textfield. You have to write code which can read from that multi-field property.


  3. Hi Hashim,
    I’m working in a version upgrade project from CQ5.5 to AEM 6.2. The issue is with the services, after installing the same code package in couple of author instances. One of them is working fine and in another instances some of the services were missed, this has been observed when I expand the bundle->used services block. Unable to figure out why the services were missed, this is our custom service not OOTB.


    • Hi, Is there any error message while installing the web services ? Are you able to reproduce the issue in your local instance ? From 5.5 to 6.2 there were lots of methods which were deprecated and there could be some dependency mismatch. Closely observe the logs for Errors and Warnings.


  4. Hi Hashim,

    I have written a service, i have configured that as a component and service in osgi using annotations.
    every thing fine but when i deploy that service into osgi and triggering that service using scheduler. but when i see that configuration in components tab.The configuration status shows enabled/unsatisfied mode for scheduler and our class configuration. can you please help out. i am using aem 6.0 (sp3) version. Bundle is in active mode.


  5. Hi Hashim,

    I am using AEM 5.6.1 service pack 2. Please suggest which Java version should I use? Is there some Performance slowness on Java 7 for AEM 5.6.1 SP2 or should I upgrade my java?


    • Hi, For AEM 561 , Java 1.7 is recommended. Performance slowness could be due to lots of reasons. Upgrading your java might not solve the issue. Its more related to Maintenance and Health of the environment.


  6. What causes the querybuilder to not return results on a publish instance?
    Currently I have a query built to pull assets out of the dam by a specific location and by a set of tags. The query works on my authoring instance but does not work on my publish. I’ve validated that the assets and the tags are published. As well as well anonymous access is allowed. What else is missing?


    • Hi Carolyn,
      Can you try to fire the query in Publish instance using /libs/cq/search/content/querydebug.html ?
      Check the logs, what is missing on publish instance. Check if all the data is same in author and publish instance. If you are using dispatcher check if proper filters are present there.


      • Thank you Hashim.
        Yes I have been using the query debugger to make sure that my query is correct and there isn’t anything wrong with the parameters I am using. I am able to get results on author for the parameters I am using in the debugger.

        After looking into the logs it was giving an error about not being able to delete an old tar file from “C:\aem\author\crx-quickstart\repository\segmentstore\”.
        Error from log:
        “org.apache.jackrabbit.oak.plugins.segment.file.FileStore TarMK GC: Failed to remove old file C:\aem\author\crx-quickstart\repository\segmentstore\data00057v.tar. Will retry later.”

        I’ve renamed the file to tarOLD but now the error has moved to “C:\aem\author\crx-quickstart\repository\segmentstore\data00057w.tar” . However, if I rename “data00057w.tar” to tarOLD I get a 500 error on the authoring instance. Both “data00057w.tar” and “data00057v.tar” are very old, dated 3/10/2017, since then I have the latest of 4/11/2017 “data00087a.tar”.

        Why is it trying to use such old tar files and how can I make author and the publish instance point to the latest of 4/11/2017 “data00087a.tar”?

        Liked by 1 person

  7. Hi Hashim ,
    Thanks for supporting . Actually we need a multiple choice questions such as Exam pattern for to test and as well as to prepare the Question paper for exam .
    and am waiting for your reply…




  8. Hi,

    If I configure from OSGi bundle configuration console , configuration files is stored under “/apps/system/config”.
    1) Does the configuration under config folder is applied for both author and publish instance

    2) If yes then how will they we connected?
    If no? Do I need to package and install in publish.
    3)If I have configuration under config.publish of author instance, Does this configuration available on publish?


    • Hi Raghave,
      Its always advisable to create configurations based on environment runmodes. So you should create configurations like and config.publish which are respectively applied on author and publishers.

      If a particular configuration isn’t present in both the above folders, it checks the config folder. The most matched runmode is selected. eg. if the same config is present in config, and and your environment has runmodes like author,dev , the Configurations under is picked.

      I hope it clears your understanding.


    • Hi,
      Yes you can use Query Builder Search in the payload node under /etc/workflow/instances/server0/2017-04-19/test_workflow/data/payload . There should be the path of your page.

      No such information is stored at the Page level, but the payload information is stored in the Workflow Instances.


    • Hi,
      Yes sure. There could be 2 ways to do this –
      1. Your component (JS or Controller) makes an ajax call to Servlet from the page, Servlet calls the Services which in-turn makes third party API call , process the data (Query / Ordering) as per need and return a JSON back to page to display.
      2. Your component (JS or Controller) makes an ajax call directly to the third party API , and display on the page. Assuming the third party API is responsible for data processing as per need.


  9. CQ5 wokflow Approval / Rejection Notification :
    @hashimkhan : Can you help me on below requirement.

    Requirement : I want to display some popup message for CQ workflow approval or rejection message in the form of pop up message or some dialog box message in place of normal email notifications. Can anyone guide me how to approach this ?
    Normal email notifications are not required, needs to display a popup message on workflow approval / rejection.


  10. Hi Hashim,
    we have a requirement that we have to use AEM login with j_username and j_password, but those values we have to send to a restful web-service and get the response, some said we have write our customExternalLogin extending ExternalLoginModule. can u suggest me the best way to implement this.
    Thanks in advance.


    • You have to write your Custom Authentication Handler and gave its priority above the AEM authentication handler. So whenever you will login , that Custom Authentication Handler will be called , from there you can make a call to your rest WS.


  11. Hi,

    I want to create one admin component, that allow user the capability of updating grouped contents which are similar in nature. That way user can action on one content and update all others at the same time.

    What AEM functionality should I implement here?


  12. In AEM, images of size 4 MB in DAM and these images can be 1000s , also need to be shown on mobile, what would be an efficient approach for this?
    Scenario is that I have to use 1000s images in DAM for different devices say desktop, mobile. With 4 Mb size it could cause an inefficiency while downloading an image on mobile. Can you suggest an approach for this?


  13. Hello Hasim,
    We have migrated our application from 5.5 to 6.2 recently. Could you please help us in finding solutions for the following:
    1. Our application is mainly based on content(each page have atleast 6 sublevel content and whole content size would be aroung 20-30 gb)
    2. Search functionality is used in our app using EXTJS (post extjs.form to bin/querybuilder.json) and using lens for displaying results.
    3. Search was slow in 5.5 but it became worse in 6.2
    4. Is there a way include SQL2 queries with less code changes(as our application is very huge and difficult to rewrite whole app)

    Could you please suggest to improve search either with existing EXTJS or changing to SQL2

    Thanks in Advance


  14. Hi Hashim, Is it possible to add multiple patterns of etc/map configurations with different sling matching patterns for the same domain? There is a requirement to add multiple url matching patterns to construct a redirection url, based on url matching patterns.



    • Hi Sudhakar,
      Yes you can do so. In fact all the redirects could be replaced by etc mappings using Regex redirection rules. eg :
      “jcr:primaryType”: “sling:Mapping”,

      “_SalesLeadCapture_any”: {
      “jcr:primaryType”: “sling:Mapping”,
      “sling:match”: “(?i)SalesLeadCapture/Pages/(.+).aspx$”,
      “sling:internalRedirect”: “/content/xyz/site/us/en/want-to-serve”

      “_xyzfreestyle_any”: {
      “jcr:primaryType”: “sling:Mapping”,
      “sling:match”: “(?i)xyzfree/Pages/(.+).aspx$”,
      “sling:internalRedirect”: “/content/xyz/site/us/en/xyz-free”


  15. Having issues while creating Metadata Profile in AEM 6.0. Getting the below error on the console when I hit the submit button in the “Add Metadata Profile” modal window.

    metadata:4 Uncaught SyntaxError: Unexpected token < in JSON at position 7
    at JSON.parse ()
    at exists (profilelist.js:201)
    at HTMLButtonElement. (profilelist.js:96)
    at HTMLDocument.dispatch (jquery.js:4624)
    at HTMLDocument.elemData.handle (jquery.js:4292)

    Steps to Reproduce :
    1. Navigate to /libs/dam/gui/content/processingprofilepage/metadataprofiles.html/dam/ingestion/profiles/metadata
    2. Click on “+” to create the Metadata Profile.
    3. Provide the “Title” in the modal window and click on Submit button.

    Result : Nothing happens.

    Note : I have not customized anything, using the AEM 6.0 OOTB feature.

    Please let me know if you come across the same issue. Thanks in advance.

    Referred the below link for creating the profile


    • Hi Prabodh,

      For any OOTB issue you can raise a daycare ticket. What is the error which you are getting in Console/ Logs ? Its difficult to debug without any logs or errors.

      Most probably if this is an OOTB issue you should use Vanilla instance and then upgrade to the latest Service pack for that instance with all the Hotfixes and then even if it doesn’t work raise a ticket to daycare.


  16. Hi @hashim,

    Recently we are trying to use vanity URLs in our CQ 5.6.1 with Service Pack 2.

    Vaniity URLS are working fine in publisher how ever when we are trying in dispatcher and live getting 404 Errors.

    We have followed below blog and configured every thing but still it is not working and getting 404 error.

    If I add allow rule for vanity url like { /type “allow” /glob “GET /vanitycheck.html” } then Dispatcher is looking for vanitycheck.html file inside document root path. For example if document root is content/en_us/ it is checking the url inside this path and in publisher it will be 404(ip:4503/content/en_us/vanitycheck.html).

    If I remove the allow rule then in dispatcher log it is saying filter rejected the URL.

    Are we missing any thing more from the above blog. Please help.



  17. This is regarding connectivity of Marketing Cloud with the Mobile Application.
    We have AEM as backend and the Front end is handled by another team. We introduced Marketing Cloud to hold the assets. Cloud and AEM DAM Assets have been synchronized.
    Now, We need to connect the third party(IOS Mobile App) with the Marketing Cloud to access the assets there.
    Whenever attempted from front end, it preempts for a login since the asset URL requires Authentication. We do not have any connectivity between the Marketing Cloud and the App yet for the authentication.
    We need to make sure that whenever the Mobile Application hits a Cloud asset URL, it should not pre-empt for login.


  18. Hi Hashim,
    in our project we have number of clients.(50+) so we decided to create a MASTER COPY of the site so that we can create live copies of that. could you please provide proper approach to achieve this thing?


  19. @hashim : Please help me in below scenario :
    How to fetch node properties in ECMA script ? While using below script, am getting error like :
    “TypeError: Cannot find function hasProperty in object”
    “TypeError: Cannot find function getProperty in object”
    Am using this script to test the custom properties validation :
    Sample code: function check() {
    if (workflowData.getPayloadType() == “JCR_PATH”) {
    var pagePath = workflowData.getPayload().toString();
    var finalNode = jcrSession.getItem(pagePath);
    if(finalNode.hasProperty(“crcNumber”) && finalNode.hasProperty(“notes”)){
    var crc = finalNode.getProperty(“crcNumber”).toString() ;
    var notes = finalNode.getProperty(“notes”).toString();
    if (!crc || !notes ) {
    return false;
    return true;
    return false;
    }catch (e) {
    return false;


  20. Hi Hashim,

    I am trying to hit aem jcr node to retieve 3rd level json but getting 300 response. Is there any way to retrieve json/ how to avoid 300 error.

    Rest : -http://localhost:4502/tmp/nxt/Addon.3.json
    Response :- [“/tmp/nxt/Addon.2.json”,”/tmp/nxt/Addon.1.json”,”/tmp/nxt/Addon.0.json”]


  21. Hi Hashmin,

    i had a classloader issue with javax.activation for web service with attachment using MTOM in AEM 6.1 sp2. The issue is resolved by following the link . Here , the solution is to add extra package javax.activation in file to load the package on start up. This requires AEM restart, so i was thinking of other solutions that doesn’t require AEM restart. May be setting some configurations that will affect the or may be some package export in my project pom file.


  22. Hi Hashim,

    I have a utility component which converts spreasheet into json file. Json is getting generated which I can view in classic UI but it’s not appearing in aem 6.1 touch UI.
    Is this a product issue or something else. Can it be resolved ?



    • Hi, Anything which you are developing as a Custom component isn’t a product issue. I guess there should be some error in Touch UI console from your utility component, which is breaking the Json. Try to check in firebug where the issue is present.


  23. Hi Hashim

    I have a query… If there is a repository crash is there a way the AEM can recognize the crash and report it to a SPOC by triggering an email. And also is there a way where the AEM can pick up the keywords from the logs and trigger an email for that issue.


    Liked by 1 person

    • Yes , all of this is possible and many large environments are using tools like Nagios and AppDynamics. AEM itself doesn’t have that capability , but you can use third party monitoring tools.


    • Hi Sanketh, Where have you read this ? This seems odd. Adobe / Apache always try to add new features being backward compatible. And this seems to be a major change. So I dont think its happening anytime.


  24. Hi Hashim,

    I have a scenario, i want to replicate a content from author A to author b but when the content in author b is in workflow i want the replication done from author a should fail or its it should not override the content in author b. is there any way i can handle this, i tried using event handler and listener on author b but its not working.
    for example from author A i want to replicate the page “footer” but the same page “footer” in author b is already in workflow .i want the replication should fail in author a as the same content in author b is already in workflow.

    Any suggestion will help.



    • Hi Neeraj, I dont understand the requirement for a replication from one author to another ? But if you still want to do it , you may check the page in Replication Queue. If the page is present in that, skip the replication else go on.


  25. Hey Hashim,

    I have doubt related to header and footer component. What should I use to make my header and footer availa ble and editable in every page of my website which has 3 different templates?


    • It depends how you want to handle the authoring. If you want to author based on templates, you can do by Design Mode, while if you want to author at one page and want it to be picked from hierarchy go with iParsys approach. In iParsys, you can disable the inheritance at any time and make it author-able for that particular page too.


  26. Hi hashim,
    Can we start aem instance without jar file.
    And for inplace upgrade we have to replace the old jar with new jar if old jar is not there will it effect the upgradation.


  27. Hi Hashim,

    Looking for few suggestions on the below requirement (AEM 6.3):

    Need to display all Recently Viewed Products for custom e-commerce site.

    We have created custom project which has a number of product pages, which takes the data from hybris
    and displays it.

    When we use OOTB recentlyviewed component, it only displays we-retail pages and not my custom product pages. Can you please tell me if there is any property that has to be added to my custom product page,
    that will make it appear in the recentlyviewed section? or any other configuration that is required?

    Also we found out that, without the below clientlibs, the component doesn’t work.
    But not able to figure out the exact dependency for recentlyviewed component.

    Sanketh Kamath


  28. Hello Hashim – Can you help with below pls. I install a package via CURL but post installation i have to add one more check point to check the time stamp ( last installed ) time of a specific package via CURL. Any ways for that via CURL ( not via console )


  29. Hi Hashim,

    How aem comes to know if it has to start in author mode or publish mode. Is it just it looks for the jar file name or does it do some more things at the backend to identify the mode?


    • When you start AEM in a particular Runmode it stores that configuration in the Sling Setting properties. /system/console/status-slingsettings . Based on the Sling Settings and runmodes different configurations are applied for the instance.


  30. Hi Hashim,

    i have a footer iparsys component. i am configuring a link say link1.
    now i have 10 pages where i can see link1 as it is inherited. now if i want to change link1 text at page level say in 5 pages out of 10 i need to change it to link2. is it possible?
    can you help on this?



  31. Hi Hashim,

    Is there a way, i can control the action which triggers display of the component dialog? I want to display the component dialog after author clicks on an HTML button created by my component code. I don’t want to have the editbar which normally is available to authors to edit a component.

    I was reading through the cq:layout=auto property where this control is said to be with the client side script but could not get much information.

    For AEM 6.3


  32. Hi Hashim,
    I have a search component with searchable fields and result table. It is developed in sightly and used WCMUsePojo class that has search logic.
    On load of the page,all data has to be displayed and on click of search button – data corresponding to search criteria has to be displayed.
    I added form element to my sightly html page and action=”get”. So on click of search button, page is refreshed and data corresponding to search criteria is displayed.
    However,search criteria input parameters are added as query strings to the URL which looks like bad design.
    I also tried to create a servlet to just redirect to same page, but this is also not working. Getting null pointer exception at dispatcher.forward.
    Could you please suggest an approach to solve this problem.



    • Hi Satya,
      You can create a Servlet which has all your business logic for Search. Pass a parameter searchCriteria in a method and when thats defined perform limited search or else perform complete Search. Now it would be better if you dont refresh the page everytime on each search. Create an ajax call , for the first load, call that servlet in default mode without any searchCriteria param and on subsequent search call that servlet with search criterias.
      With respect to Caching the servlet GET call, its better to use selectors to pass on parameters instead of query strings . This way if some other user also search for same word , cached response can be returned.

      Liked by 1 person

  33. Hi Hashim,

    my email functionality is not working.
    When i try to trigger mail it throwing 404, where it is available and in bundle is in active state.
    my servlet path starts with /bin which is allowed in Resolver/Error handler service. i have tried almost everything . CSRF filter checked. Removed POST and tried but not working. no logs found on this. what could be the cause? but all services/bundles and configuration settings are in place. could you please what could be the reason? using aem 6.2


    • Try to open the service class which you have written in AEM Debug Mode and identify the issue OR you can add debug logs in all the places to find the flow of code. I cant say anything without seeing the code.


  34. Hi Hashim,

    Could you tell me how to Audit purge the pages from /var/content folder?
    I got the workflow package(Workflow n Audit from CQ5.5 it doesn’t seem to work in CQ6.0 and higher.

    Please provide a detailed explanation for CQ6.2 users?


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s