Skip to main content

Posts

Showing posts from 2018

Helpful AEM Queries

Find out the nodes where the property exists and not empty. SELECT * FROM [nt:unstructured] as node WHERE ISDESCENDANTNODE(node, "/content/path-to-search") AND node.[propertyname] <> "" Search for all the nodes which are having a specific value SELECT * FROM [nt:unstructured] as node WHERE ISDESCENDANTNODE(node, "/content/path-to-search") AND node.[propertyName] = "property-value"

AEM - Few Important Information for debugging

Compiled Class path before AEM 6 is available in the crx console /var/classes/org/apache/jsp/apps/<<Project_Name>> Compiled Class path from AEM 6.1 is available in the installation directory of AEM /crx-quickstart/launchpad/felix/bundle305/data/classes/org/apache/sling/scripting/sightly/apps/<<Project_Name>> Extract log statements in b/w a specific time frame: awk '/^01.08.2018 00:07:23.002*/,/01.08.2018 00:09:09.345*/' error.log > /tmp/error_aug1_period.log Create a custom logger from crx/de  To configure a custom log file, perform these steps.  1. In CRXDE Lite, select /apps/logsample/config.author. 2. Create a node with below configurations:      Type - sling:OsgiConfig      Name - org.apache.sling.commons.log.LogManager.factory.config-logsample-model 3. Add the following properties to this node:       org.apache.sling.commons.log.file (String) - logs/logsample-model.log (specifies the location of the custom log file)