Submitting Mobile Form Data to Adobe CQ

-Scott MacDonald

You can create an Adobe CQ mobile form using JQuery Mobile API. When a mobile user fills in the form and clicks the submit button, form data is submitted to Adobe CQ. You can develop an OSGi bundle operation to process the submitted form data to meet your business requirements.



Read the full blog post at Adobe Digital Marketing Blog

Ways to access your content with JCR (part 1)

- Jörg Hoh

If you are a developer and need to work with databases, you often relay on the features your framework offers you to get your work done easily. Working directly with JDBC and SQL is not really comfortable, writing “SELECT something FROM table” with lots of constraints can be tedious …

The SQL language offers only the “select” statement to retrieve data from the database. JCR offers multiple ways to actually get access to a node:

Each of these methods serve for different purposes.

  • session.getNode(path) is used, when you know exactly the path of a node. That’s comparable to a “select * from table where path = “/content/geometrixx/en” in SQL, which is a direct lookup of a well-known node/row.
  • node.getNodes() returns all child nodes below the node. This method has no equivalent in the SQL world, because in JCR there are not only distinct and independent nodes, but nodes might have a hierarchical relation.
  • The JCR search is the equivalent of the SQL query, it can return a set of nodes. Yes, ANSI SQL 92 is much more powerful, but let’s ignore that for this article, okay?



Read the complete post on the Things on a content management system 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

CQ5.5: javax.jcr.RepositoryException: Unable to register data store in cluster

- David McMahon


If you are installing and starting a new CQ instance you may experience the following exception:

*ERROR* [FelixStartLevel] org.apache.jackrabbit.core.RepositoryImpl failed to start Repository: Unable to register data store in cluster. javax.jcr.RepositoryException: Unable to register data store in cluster. Caused by: <server_hostname>: <server_hostname> at at at at at at at<init>( at<init>(
… 56 more



To view the solution, read the original blog post at The Adobe Enterprise Product Blog.