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 .

Hashim

Advertisements

547 thoughts on “Ask Me ?

  1. Hi Hashim,

    I’m extending ‘com.adobe.cq.sightly.WCMUsePojo’ class and using request session in it to set some properties on content node (current resource). so I want to logout my session after performing that operation.

    I’m doing it using below code snippet.

    if(null != requestSession) {
    requestSession.logout();
    }

    But while doing it I’m getting below error.

    org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught SlingException
    java.lang.IllegalArgumentException: javax.jcr.RepositoryException: This session has been closed.

    So is that not necessary to do session logouts in ‘WCMUsePojo’ extending classes? If we don’t do it, will Sling take care of it automatically?

    Thanks in Advance Hashim…

    Thanks,
    Srikanth

    Like

  2. Is there any way to get Mock Object of FrameworkUtil. We are using AEM mock for unit testing. Below is method :- public static T getServiceReference(Class serviceClass) {
    T serviceRef;
    BundleContext bundleContext = FrameworkUtil.getBundle(serviceClass).getBundleContext();
    ServiceReference osgiRef = bundleContext.getServiceReference(serviceClass.getName());
    serviceRef = (T) bundleContext.getService(osgiRef);
    return serviceRef;
    }
    While testing i’m getting null pointer exception on FrameworkUtil.getBundle(serviceClass). Can you please help me here.

    Like

    • Hi,
      For AEM developer exam you need to know AEM development first, as the questions asked there are scenario based and not all of them could be answered just by cramping up things. I would suggest first gain some experience via few projects and then attempt for the exam. I cant time base it in general.

      Like

  3. Hi Hashim,
    Need your help on the Dispatcher Configuration setup. I’m trying to configure Dispatcher for the first time. I’ve followed all the instructions given on the internet and I’m able to cache my Sample Website for now but it’s working as expected in IE Browser only. When I open the same page on Chrome, it’s not getting cached. Is there any setting that I’ve to explicitly add to make it work in Chrome?

    Steps followed:
    –> Installed Apache httpd Server (on 8081 port)
    –> Installed Dispatcher
    –> Made all the requireed changes in httpd.conf and dispatcher.any file.

    Also, Is it mandatory to logged on AEM Publish instance when we’re hitting a page via Dispatcher? Like, I’m accessing this page “http://localhost:8081/content/geometrixx-outdoors/en/women.html” when I’m logged in AEM Publish Instance, it’s working fine but when I’m logged out from AEM publish Instance and trying to hit this URL, I’m getting an error which says : Bad Gateway The proxy server received an invalid response from an upstream server.

    Like

    • Change the dispatcher logs to Debug to identify whats the issue. I don’t think there should be any browser specific caching configurations in Dispatcher configs. There isnt any specific dispatcher configurations for chrome. Logs would give you better idea.

      Second part, its not necessary to login to Publisher if you are accessing a public page via Dispatcher. Do check your allowauthorized flag and if the page needs a signin to display. Check dispatcher logs to debug more.

      Like

  4. Hi Hashim ,

    On CQ 5.4 we are facing an issue of CQ author portal unavailability,however the author process is running fine. When we checked the server.log due to a tree replication(bulk content deployment) the issue occurred
    The log was like this – 30.08.2017 03:01:48 *WARN * servletengine: Thread pool limit reached.

    I just went thru this https://helpx.adobe.com/experience-manager/kb/ThreadPoolLimitReached.html link where they have mentioned that in such situations we can increase the default value of
    128

    Can you put some thoughts on the same . Can we increase the count, if yes what is your recommendation.

    Regards
    NavinKumar KB

    Like

    • Hi Naveen,
      It means that in your instance simultaneous threads are running which is reaching the limit of the instance. In earlier versions of AEMs this was an issue which they improved in future versions. Take frequent thread dumps to identify whats the root cause for this. Also check if some schedular / workflow process / constant JCR changes are happening in your instance. There could also be Lucene indexing happening in backend due to constant content changes . Thread dumps / JVM profiler can give you a better picture.

      Like

  5. Hi Hashim,

    I am getting an issue after mounting a dispatcher on Author instance.

    After logging on author dispatcher amd creating a new page and using few components(like image )
    Once this is refreshed ,my components configured on page are not rendering until and unless i clear my browser cache.

    I want to tell you that i havent configured dispatcher flush agent because i am not caching /content.
    I am only caching lib, app and etc
    Specially i am targeting js and css files.

    Can you please help me here?

    Like

    • Hi Manish,
      You should create appropriate caching rules for Dispatcher cache . If the *.htmls are getting cache there should be something wrong with the configurations. Check the dispatcher folder and dispatcher logs to debug further.

      Like

  6. Hi Hashim,
    i am trying to create Livecopy using Blueprint facility for in my project. While i am creating live copy using New Site option, selected Blueprint and langauages not showing up, navigate next step and selected chapters , selected live copy tick and roll out and finish. after this livecopy is not creating at all.

    what could be the problem? there is no language to select, is it causing the issue? could you please help on this?

    Like

  7. Hi Hashim,

    i am developing a search component in our project. Our requirement is not to show some content pages /specific content when we do search. So how can i exclude that content from searching .

    Thanks in advance

    Like

  8. Hi,
    I have a doubt in the below question. Please help me out
    There is an external dependency that you have included in your pom.xml file. But when you install the bundle in felix console, bundle is not active. To include the classes from the external dependency, which one of the below will you use ?

    Like

  9. Hi Hashim,
    The size of Author and Publish instances are increasing drastically, right now 107 to 110 GB..
    I used to perform offline compaction which ealier used to free up a lot of space, but it seems to free only about 10 GB now.
    What might be the cause and if possible, a solution for this?
    -Ekta

    Like

  10. Hello, we have problem w CFP 8 installed on AEM. It changes DOM structure our custom multistep form so that we can’t see tabs (LIs in OL) anymore, just a list… What should be the best approach to solve this issue? Introduce new class and correct styles or amend JS files? Many thank for your answer.

    Like

  11. Hi Hashim,

    We ran online garbage collection on our Author but after the restart author is not starting. The log files say “Segment not found”. I tried backing up from the latest good revision(Source – https://forums.adobe.com/thread/2321917), but the search ended in “No good revision found”.
    Please suggest what needs to be done in this case.
    We’re using Adobe Experience Manager, Version 6.2.0.SP1-CFP4. Thank you.
    – Ekta

    Like

  12. This question is regarding handlebars login component in AEM 6.3.

    In the file(/libs/social/console/components/hbs/login/login.hbs),
    there are parameters like redirectUrl and loginUrl. Now from handlebars syntax,
    we understand that these are handlebar expressions whose data will be dynamically replaced,
    but from where the data is getting populated. looks like there is some json binding.
    Could you please give clarity if you have worked on handlebars?

    Like

  13. Hi Hashim,

    i Need to upload package on local AEM setup.
    im not able to upload package on console bcoz of it is restricted on network level.
    So im dropping package on INSTALL folder in CRX_QUICKSTART…..

    Im trying to upload my DAM package — (package 1-6GB, package 2-6GB) and dropped it to INSTALL folder…but its not reflecting in console?small packages are reflecting ..please advice.

    Like

  14. im getting below when i upload a package(6GB).But im able to upload small packages,i have attached the result on below:

    C:\Users\gopinath.m>curl -u admin:admin -F file=@”C:\Users\gopinath.m\Downloads\
    mph_Dam2.zip” -F name=”mph_Dam2″ -F force=true -F install=true http://localhost:
    4502/crx/packmgr/service.jsp

    +————+—————————————–+
    | Arguments | Comment |
    +————+—————————————–+
    | cmd=help | print this help |
    +————+—————————————–+
    | cmd=ls | print a list of all packages |
    +————+—————————————–+
    | cmd=rm | remove a package |
    | name | package name |
    | [group] | group name (optional) |
    +————+—————————————–+
    | cmd=build | build a package |
    | name | package name |
    | [group] | group name (optional) |
    +————+—————————————–+
    | cmd=inst | install a package |
    | name | package name |
    | [strict] | true to fail on error |
    | [group] | group name (optional) |
    +————+—————————————–+
    | cmd=uninst| uninstall a package |
    | name | package name |
    | [group] | group name (optional) |
    +————+—————————————–+
    | GET | download a package |
    | | (content-disposition header contains |
    | | the correct filename) |
    | [cmd=get] | optional |
    | name | package name |
    | [group] | group name (optional) |
    +————+—————————————–+
    | POST | upload a new package |
    | file | package to upload |
    | [name] | optional name |
    | [strict] | true to fail on install error |
    | [install] | automatically install package if ‘true’ |
    +————+—————————————–+

    ok

    WHEN I UPLOAD SMALL PACKAGE:
    C:\Users\gopinath.m>curl -u admin:admin -F file=@”C:\Users\gopinath.m\Downloads\
    mph_Dam1.zip” -F name=”mph_Dam1″ -F force=true -F install=true http://localhost:
    4502/crx/packmgr/service.jsp

    my_packages
    Mph_Dam1

    Mph_Dam1.zip
    9950

    gopinath.m

    gopinath.m

    null

    Installing content…
    Creating snapshot for package my_packages:Mph_Dam1
    A META-INF
    A META-INF/vault
    A META-INF/vault/config.xml
    A META-INF/vault/filter.xml
    A META-INF/vault/nodetypes.cnd
    A META-INF/vault/properties.xml
    A /.content.xml
    A /content
    A /content/.content.xml
    A /content/dam
    A /content/dam/.content.xml
    – Aggregation status: 2 of 0 prepared, 1 collected
    A META-INF/vault/definition/.content.xml
    Collecting import information…
    Installing node types…
    – rep -> internal
    – nt -> http://www.jcp.org/jcr/nt/1.0
    – sling -> http://sling.apache.org/jcr/sling/1.0
    – sling:Folder
    – sling:OrderedFolder
    – sling:Redirect
    – sling:Resource
    – rep:RepoAccessControllable
    Installing privileges…
    Importing content…
    U /
    – /content
    – /content/dam
    A /content/dam/mphasisblog-lkeue
    A /content/dam/mphasisblog-lkeue/resource-assets
    A /content/dam/mysite-iv4kr
    A /content/dam/mysite-iv4kr/resource-assets
    A /content/dam/plainsite-civtt
    A /content/dam/plainsite-civtt/resource-assets
    saving approx 7 nodes…
    Package imported.
    Package installed in 281ms.

    ok

    Like

  15. HI Hashim,

    We have created some custom metadata fields by touch UI by creating DAM metadata schema and applying schema to our client specific folder. But we are unable to do the same for classic UI. Unable to create metadata properties for DAM assets in classic UI. Below link is not giving more information
    “https://docs.adobe.com/docs/en/cq/5-6-1/dam/metadata_for_digitalassetmanagement.html#Creating New Metadata Property for Assets”

    Can you give info on how to create DAM metadata properties in Classic UI and applying to client specific folder. (In addition to existing fields, needs to add additional fields. I tried Metadata Template in classic UI , but of no use.)

    Liked by 1 person

  16. HI Hashim,

    I want to customize the “Start workflow” wizard while starting a workflow in Touch UI. needs to add more additional fields and wants to save them in metadata . Can you guide me how to customize the “Start Workflow” wizard to add new fields in AEM 6.3 Touch UI, and how to apply this customization to our client specific workflows only ??

    Thanks & Regards,
    Ramesh

    Liked by 1 person

    • Hi,
      Please take a look at these paths for such customizations :
      /libs/wcm/core/content/editor/jcr:content/content/items/content/content/items/startworkflowmodal
      /libs/cq/gui/components/authoring/workflow/startworkflow

      Make sure you override the libs files into your apps folders to change anything .

      Liked by 1 person

      • Hi Hashim,

        In extension of above scenario, can I know how to control form fields based on selection of a value in dropdown of another field. Actually I found an article in below link which we will be used for controlling fields based on our selection in touch UI dialog (cq:dialog). But in html page, when we are working on form, how can we control some widgets to show and hide based on our selection in dropdown ?

        Example : In sites after selecting a page -> Create workflow -> In “Create workflow” page, If we select our project related workflow from dropdown, I need to display two more fields otherwise I want to hide them.

        The below links explains similar scenario under Touch UI dialog (cq:dialog) but not in Form.
        https://helpx.adobe.com/experience-manager/using/dynamic_touchui.html
        Please guide !!!

        Like

  17. Hi Hashim,
    We are using runmode (author, author.prod, author.qa, similarly for publish too) configs(corresponding to osgi component) in our project. When I checked OSGI console, some configs are not bound and default values (which I mentioned in java component code) are displayed but not environment specific. Also, one more thing I observed is, some config whose values are displayed properly according to environment, and If I change any of its value in code and redeploy. It gets screwed and newly modified value is not displayed.

    Any idea why is this happening only for few configs.

    Thanks in advance

    Like

  18. What is the difference between ResourceResolver and ResourceResolverFactory interface? If we use both the interfaces to access the resources, hence in which scenario we should use these interfaces?

    Like

  19. Hi Hashim,
    Can you provide some guidance on creating Lucene index properties for dynamically created pages from code on which we don’t have control.
    In our application, we create cq pages dynamically from the code and those pages having child pages nested upto 4-5 levels with specific nodes under jcr:content as well. I want to add indexing for one of the properties in these pages. How can I achieve it?

    Like

  20. Hi Hashim,

    Can I know how to control form fields based on selection of a value in dropdown of another field. Actually I found an article in below link which we will be used for controlling fields based on our selection in touch UI dialog (cq:dialog). But in html page, when we are working on form, how can we control some widgets to show and hide based on our selection in dropdown ?

    Example : In sites after selecting a page -> Create workflow -> In “Create workflow” page, If we select our project related workflow from dropdown, I need to display two more fields otherwise I want to hide them.

    The below links explains similar scenario under Touch UI dialog (cq:dialog) but not in Form.
    https://helpx.adobe.com/experience-manager/using/dynamic_touchui.html
    Please guide !!!

    Like

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s