Adobe CQ/AEM support tools available

-David McMahon

We have recently published a package with support tools that can be useful to help diagnose issues encountered with Adobe Experience Manager.  As the tools project continues to mature, additional tools will be provided to ease the overall diagnosis and maintenance of CQ.



Read the full blog post at Adobe Digital Marketing Blog

CQ coding patterns: Sling vs JCR (part 2)

- Jörg Hoh

In the last posting I showed the benefits of Sling regarding resource access over plain JCR. But not only in resource access both frameworks offer similar functionality, but also in the important area of listening to changes in the repository. So today I want to compare JCR observation to Sling eventing.

JCR observation is a part of the JCR specification and is a very easy way to listen for changes in the repository.

@component (immediate=true, metatype=false)
class Listener implements ObservationListener {

  SlingRepository repo;

  Session session;
  Logger log = LoggerFactory.getLogger (Listener.class);

  protected void activate () {
    try {
      Session adminSession = repo.loginAdministrative(null);
      session = adminSession.impersonate (new SimpleCredentials("author",new char[0]));
      adminSession = null;
      session.getObservationManager.addEventListener( this, // listener
        "/", // absPath
        true, // isDeep
        null, // uuid
        null, //nodeTypeNames
        true // noLocal
    } catch (RepositoryException e) {
      log.error ("Error while registering observation", e);

  protected void deactivate() {
    session = null:

  private handleEvents (Events events) {
    while (events.hasNext()) {
      Event e =;
      … // do here your event handling

In JCR the creation of an observation listener is straight forward, also the event listening. The observation process is tied to the lifetime of the session, which is started and stopped at activation/deactivation of this sling service. This kind of implementation is a common pattern.



Read the complete blog post at


CQ5 coding patterns: Sling vs JCR (part 1)

- Jörg Hoh

CQ5 as a complex framework is built on top of various other frameworks, on the server-side the most notably ones are JCR (with its implementation Apache Jackrabbit) and Apache Sling. Both are very powerful frameworks, but both of them have some overlap in functionality:

In these 2 areas you can work with both frameworks, and achieve good results with both. So, the question is, in what situation should you prefer Sling and in what situation pure JCR.

First, and I hope you agree here, in 99% of all cases use the an abstracted framework is recommended over the use of concrete technology (everybody uses JDBC and noone a direct database interface for e.g. MySQL) . It usually offers more flexibility and an easier learning cure. Same here. While on pure JCR you only work with raw repository structures (nodes and properties), the Sling resource abstraction offers you easier handling (no need to deal with the repository exceptions any more) and much more options to interact with you business objects and services.



Read the complete blog post at

How to Fix No Such Item repository corruption in CQ5.5

- Yogesh Upadhyay


Use Case: You have repository corruption that can not be fixed using consistency check and fix.Prerequisite:

Stack Trace:

05.11.2012 00:30:01.476 *ERROR* [pool-5-thread-2] com.citrix.avanti.auth.importer.impl.GroupImporter Unable to perform role import javax.jcr.ItemNotFoundException: failed to build path of 795cff24-7fd7-3f5f-a9b1-4724c3a6ff4d at org.apache.jackrabbit.core.HierarchyManagerImpl.getPath( at org.apache.jackrabbit.core.CachingHierarchyManager.getPath( at org.apache.jackrabbit.core.ItemImpl.getPrimaryPath( at org.apache.jackrabbit.core.NodeImpl.getPrimaryPath( at org.apache.jackrabbit.core.ItemImpl$2.perform( at org.apache.jackrabbit.core.ItemImpl$2.perform( at org.apache.jackrabbit.core.session.SessionState.perform( at org.apache.jackrabbit.core.ItemImpl.perform( at org.apache.jackrabbit.core.ItemImpl.getPath( at <Some Custom Code> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask( at java.util.concurrent.ThreadPoolExecutor$ at Caused by: org.apache.jackrabbit.core.state.NoSuchItemStateException: 34228aff-f648-429a-a097-29de8568fe3e at org.apache.jackrabbit.core.state.SharedItemStateManager.getItemState( at org.apache.jackrabbit.core.state.LocalItemStateManager.getNodeState( at org.apache.jackrabbit.core.state.LocalItemStateManager.getItemState( at org.apache.jackrabbit.core.state.XAItemStateManager.getItemState( at org.apache.jackrabbit.core.state.SessionItemStateManager.getItemState( at org.apache.jackrabbit.core.HierarchyManagerImpl.getItemState( at org.apache.jackrabbit.core.HierarchyManagerImpl.buildPath( at org.apache.jackrabbit.core.CachingHierarchyManager.buildPath( at org.apache.jackrabbit.core.HierarchyManagerImpl.getPath( ... 18 more

How to Fix (If it is not cluster then ignore cluster steps):



Read the complete blog post at