Posts Tagged ‘Adobe Day CQ’


Apache Sling is one of the core technologies used in Adobe Experience Manager (formerly known as Adobe CQ / Day CQ).

Sling started as an internal project at Day Software, and taken up by Apache in September 2007. It’s the reason why some bundles/libraries are named like com.day.

The other important technologies include Apache Jackrabbit, Apache Felix, OSGi. We will discuss about the Apache Sling in this article, and how to create a sample content and consume it.

Apache Sling is a web framework that uses a Java Content Repository (like Apache Jackrabbit) to store and manage content. Sling applications use either scripts or Java servlets to process HTTP requests in a RESTful way.

Sling in very simple terms could be described as a REST API for JCR. We can use http requests to manage content inside the repository. Sling provides a mechanism to render that content in different ways. We can use JSP, ESP scripts, Java (servlets, pojos, etc) in the Felix container to process requests and deliver content.

When a request is made for a particular node, Sling looks up for a property called sling:resourceType. This is used to look up the rendering scripts for the requested resource.

Apache Sling is:

  • a REST based web framework
  • Content-driven, using JCR
  • Powered by OSGi framework
  • an Apache Open Source project

We shall see an example of how to start, create node and read the node’s content from Sling.

  1. Download Apache Sling Launchpad self-runnable jar from https://sling.apache.org/downloads.cgi. In my case, I have downloaded the latest jar org.apache.sling.launchpad-8.jar
  2. After the jar is downloaded, just start it as follows:
    java -jar org.apache.sling.launchpad-8.jar
  3. This starts the Sling embedded Web Server on port 8080 and writes application files into the sling folder found in the current working directory of your choice. You can check http://localhost:8080/system/console/bundles to see if the application is started properly or not. The credentials would be admin/admin. Here you would see different bundles in started state.
  4. Create content by giving the below cUrl command:
    curl -u admin:admin -F "sling:resourceType=training/aem" -F "title=Sling for AEM" http://localhost:8080/content/myaemnode

            We can expect a response as below:

Screen Shot 2016-07-26 at 6.42.54 PM

Now check the content by using the below URLs from web browser.

Content node in HTML format: http://localhost:8080/content/myaemnode.html

Screen Shot 2016-07-26 at 6.46.47 PM

Same node in JSON format: http://localhost:8080/content/myaemnode.json

Screen Shot 2016-07-26 at 6.45.52 PM


The structure of Adobe Experience Manager implementation can be divided as follows, from lowest to highest level

  • Java Platform
    • Java Runtime Environment (JRE 1.6 minimum. JRE 1.7 recommended)
  • Granite Platform (runs on JRE)
    • OSGi Framework
    • CQSE Servlet Engine
    • CRX Content Repository
    • Sling Content Delivery
    • Granite UI
  • Abobe Experience Manager (which runs on Granite platform, within OSGi framework)
    • Individual AEM modules like:
      • WCM
      • DAM
      • Workflow, etc..
  • Customer Applications (these run on AEM)
    • Other Customer specific applications (websites, etc. also run within OSGi framework)AEM Architecture

Like every product, AEM might also have some bugs/performance issues. These are solved by supplying hot fixes (simply like patches in Oracle WebCenter Sites) to the specific AEM version.

The Hot fixes for AEM 6.1 can be found at the below url

https://helpx.adobe.com/experience-manager/kb/aem61-available-hotfixes.html

How to apply these AEM Hot Fixes?

The hot fixes can be applied either through the package share or manually.

AEM 6.1 introduced the concept of deploying the Hotfixes manually. We will now see how to deploy the downloaded hotfixes manually.

1.   Login to the server

2.   Stop the instance.

3.   Create a new directory called install in <path-to-installation>/crx-quickstart/ directory.

4.   Copy the downloaded hot fixes to the install directory.

5.   Restart the instance.

6.   Go to the package manager and check whether all the hot-fixes are installed properly or not.


Below are the different logs which are generated by AEM. These logs can be found at <path-to-installation>/crx-quickstart/logs folder.

  1. access.log   –      All access requests to AEM WCM and the repository are registered here.
  2. audit.log      –      Moderation actions are registered here.
  3. error.log       –      Error messages (of varying levels of severity) are registered here.
  4. request.log  –      Each access request is registered here together with the response.
  5. stdout.log    –      Holds logging messages indicating events during startup.

In an AEM Instance,  error.log is the file which logs all the error messages. To change this file’s location and name, search for the below bundles in the AEM Web Console, and open them.

  1. Apache Sling Logging Configuration
  2. Apache Sling Logging Logger Configuration

AEM Web Console can be opened at  http:// :/system/console/configMgr

The log file location and name can be changed under the LOG FILE text field.


In Information Technology, no software stands and plays alone for a long time. There are number of new technologies coming these days, getting popular, well noticed by customers / clients. But after some time, a day comes where these technologies are dominated by other technologies.

Coming to the Content Management Systems, there are many niche players like EMC, Oracle, etc. And Adobe joined them by redesigning Communique 4. It has released ADOBE DAY CQ5, basing on Communiqué 4. ADOBE DAY CQ5 is a new WEB EXPERIENCE MANAGEMENT SYSTEM.

What is Adobe Experience Manager?

Adobe Experience Manager helps you organize and manage the delivery of creative assets and other content across your digital marketing channels, including web, mobile, email, communities, and video.

Similar to Oracle WebCenter Sites,  ADOBE DAY CQ5 helps us to build compelling content-centric applications that combine Web Content Management, Workflow Management, Digital Asset Management and Collaboration sites.

Prerequisites for development within CQ

For the developers,  to build WEM site using the Day CQ5, following technologies are required:

  • HTML
  • CSS
  • JavaScript
  • JSP

The documentation for Adobe Day CQ5 can be accessed from http://dev.day.com/docs/en.html

I’m now starting with Day CQ5, and will be updating topics on Day CQ5 from now on.

ADOBE DAY CQ5