Posts in Category "CQ/CRX"

CQ 5.5 Update 1: Service unavailable – AuthenticationSupport service missing. Cannot authenticate request.


CQ 5.5 Update 1 is now available on PackageShare.  If you have installed CQ 5.5 Update 1 you may encounter the following error in the error.log after restarting the CQ instance:

*ERROR* [0:0:0:0:0:0:0:1%0 [1340016598398] GET / HTTP/1.1] handleSecurity: AuthenticationSupport service missing. Cannot authenticate request.


After installing the Update 1 package, an info dialog appears which advises to “restart the instance”.  If you restart the instance immediately after the dialog appears, you will run into this problem.  Even after the dialog appears, the package keeps on installing behind the scenes.  This process is interrupted if the instance is restarted at this point.

You should wait until the installation has completed before restarting CQ5, checking the activity in error.log.  Once the error.log becomes quiet (after approx. 5 mins) it is safe to restart the instance.


After installing Update 1 check that all OSGi bundles have the status “ACTIVE” in the OSGi console.  Start any bundles that do not have the “ACTIVE” status and this should resolve the issue.

If the issue persists, you may have to reinstall CQ5 from a fresh copy, install the update 1 package, restart (wait until error.log shows no more activity) and finally reinstall your installed packages manually.

reference: (CQ5-18534)

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 4.9/10 (14 votes cast)

CQ5.5: Upgrade recommendations and information

This information will be useful if you are planning to upgrade your CQ environment to CQ5.5. This information is intended as a supplement to the official upgrade documentation:

You should read these recommendations, and then follow the steps in the upgrading documentation, applying the added suggestions here as required.

Trial migration

It’s better to first run a dry-run migration on a clone of UAT (author & publish instances) to ensure that there are no major issues in the upgrade process. Check if there are any changes needed for your code to work on the upgraded version. In this case, change the code and ensure you have a consistent process for applying those changes. Identify any high risk areas in the code and plan for extended testing time on these areas following the upgrade.  Repeat the steps from scratch on the UAT clone so that you’ll be sure to have a consistent end-to-end process for the upgrade. Then proceed to upgrade all the environments: DEV, UAT & PROD.


  • Create a clone of the instance to upgrade.  You’ll perform the upgrade on the clone. It will be easier to rollback in case of problems.
  • Perform a full consistency check on the repository early.  Fix any problems before attempting the upgrade/migration.
  • Read the extensive list of “Tips and Troubleshooting” in the upgrade documentation and apply the recommended changes to avoid these common problems.
  • The code-base has to be frozen before the upgrade process and all the existing bugs closed. In case it’s not possible to close all bugs, keep a detailed list of them and double check them on the upgraded version.
  • Only do 1:1 migrations. Only introduce new product features for editors/business later. This will let you focus on the migration itself and any regressions.
  • Try to get dedicated hardware for all environments (PROD + staging), this gives you much more flexibility.
  • Involve Adobe consulting if required.  This will ensure a smooth migration process adhering to best practices.
  • Compile a list of all connected systems and involve those teams in the migration planning.  Ensure they have a short turn-around time in case of issues.
  • Purge workflow history (this speeds up the update process).
  • Make sure all workflow tasks are finished (none are running).
  • Make sure you have at least 1024MB Heap configured during update.
  • Clean all the logs to make it easier to isolate upgrade issues.
    • crx-quickstart/logs/*
    • crx-quickstart/server/logs/*


Tests should cover complete authoring workflows and not just the correct rendering of templates.

Check ACLs and permissions (especially when updating from 5.2.1).

Check Workflow models – check if any customizations were overwritten.

Check all forms and form actions (especially when updating from 5.3 or older).

Production upgrade

After performing the upgrade process on a UAT instance, once you are ready to upgrade the production instances, there shouldn’t be any major/unexpected issues. The code-base should already be frozen and in a good state, and you should freeze out content changes also. Only urgent changes should be applied to the content and the author team will need to keep track of all updated pages. These can then be moved later with a package.

1. Follow all the steps documented in the upgrade docs.

2. Sign-off the environments.

3. Migrate the latest content changes (if needed).

4. Switch the instances.

5. Delete all the dispatcher(s) cache.

It’s better to keep the old instances available for a while in case of problems not encountered during all the documented steps.  You should plan enough time for bug fixing following the production upgrade.

reference: (35335)

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 6.3/10 (4 votes cast)

CQ5.5: Members of administrators group not able to unlock pages from other users


Only the user who locked the page, or the “admin” user, can unlock it.  Members of the administrators group, apart from the “admin” user, cannot unlock pages which were locked by other users.

The documentation ( states:

You can only unlock locked pages if you locked the page or if you have administrator privileges.

This may be misleading, as it is not sufficient to have administrator privileges (i.e. general members of the administrators group).  Only the “admin” account has the correct privileges.

How to unlock a page

It is possible to unlock a page using the sidekick in WCM, or using Content Explorer.

1. Using the sidekick

Log into CQ as the user who locked the page or the “admin” user.

Open the page that is currently locked in the WCM Websites panel.

In the sidekick, select the Page tab and then “Unlock Page”.

2. Using Content Explorer (http://<server>:<port>/crx/explorer)

Browse the tree to the locked page.

Right-click on the jcr:content node below the locked page.

Select “Unlock” from the context menu.

reference: (35128/CQ5-18339)

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 10.0/10 (3 votes cast)

CQ5.5: ‘uu’ is undefined javascript error in widgets.js


If you add a datetime or datefield Widget to a component dialog (e.g. /apps/geometrixx/components/title/dialog/items) in CQ5.5, you may encounter a javascript error on the page when you open the dialog, enter a date and submit it.  Your other changes in the dialog will not be displayed (e.g. the updated title will not displayed).

The javascript error says “uu is not defined” .

This is caused by an error in the JS code in
/libs/cq/ui/widgets/source/undo/UndoHistory.js (line 921).
There is an undefined variable “uu” used here.


This is a bug in CQ5.5 and will be fixed in a future release.


A workaround would be to add a definition for “var uu = CQ.undo.util.UndoUtils;” before that variable is called.

1. create an overlay of /libs/cq/ui/widgets/source/undo/UndoHistory.js to /apps/cq/ui/widgets/source/undo/UndoHistory.js
2. open /apps/cq/ui/widgets/source/undo/UndoHistory.js
3. goto line 921
4. paste the following code into line 921:

var uu =CQ.undo.util.UndoUtils;
5. line 922 should now have:

var dateValue =uu.parseDate(originalValue);
6. save the file

reference: (33913/CQ5-17726)

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 10.0/10 (12 votes cast)

CQ5.5: NullPointerException trying to reference an OSGi component/service using SCR annotations


If you are trying to reference an OSGi service or component using the SCR annotations, like the SlingRepository in the code below, then you may encounter a NullPointerException when you try to use these objects.

  * @scr.component immediate="true"
  * @scr.service interface="SampleService"
 public class SampleServiceImpl implements SampleService {
      * @scr.reference
     private SlingRepository repository;

Another symptom of this problem is that your SampleService component may not show up or register correctly in the CQ5 Web Console “components” tab (http://<server>:<port>/system/console/components).


The SCR annotations are deprecated in the latest builds of Apache Felix.

You should note that CRXDE and CRXDE Lite are both configured to automatically resolve these annotations and build the relevant XML files for you.  In other IDE environments you will have to include the maven-scr-plugin to resolve these annotations and build the XML files yourself.


To correctly reference these objects in the latest versions you should use the following syntax (note: you will have to explicitly import the Felix scr classes):

 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Service;
 import org.apache.felix.scr.annotations.Reference;


 public class SampleServiceImpl implements SampleService {

     private SlingRepository repository;
VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 5.0/10 (2 votes cast)

CRX2.2: BooleanQuery$TooManyClauses: maxClauseCount is set to 1024 running SQL2 query


If you are running an SQL2 query in CRX 2.2 you may encounter the following exception:$TooManyClauses: maxClauseCount is set to 1024

Running the query through the CRXDE Lite query window, or using QueryManager.createQuery will result in this error.


This error occurs if you are using the ISDESCENDANTNODE clause in your SQL2 query and there are too many child nodes in the result set.  It is a bug in jackrabbit-core which is part of CRX 2.2.


This issue will be solved in future releases of CQ 5.5 and CRX.


The workaround for this issue is to split your SQL2 query into multiple queries to reduce the result set for each query, and then you can consolidate the results afterwards.

reference: (32103)

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 7.0/10 (1 vote cast)

CQ5: preview mode in sidekick does not refresh automatically


If you are using the sidekick to switch between edit, design and preview modes, you may notice that the pages refreshes automatically when switching to edit and design mode, but not when switching to preview mode.

This can cause problems if you are using the WCMMode methods and properties in your application to display a different page view depending on the current mode (i.e. using conditional logic based on WCMMode.DESIGN, WCMMode.EDIT and WCMMode.PREVIEW).  If the page does not refresh when switching to preview mode, then it will display the same objects and state as it did in edit mode.


The solution is simply to force a page refresh automatically when switching to preview mode.

  1. Open /libs/wcm/core/components/init/init.jsp
  2. Add the previewReload property as follows and save the changes:
    CQ.WCM.launchSidekick("<%= currentPage.getPath() %>", {
        propsDialog: "<%= dlgPath == null ? "" : dlgPath %>",
        locked: <%= currentPage.isLocked() %>,
        previewReload: "true"
  3. Now CQ is setup to refresh automatically when switching to preview mode.

reference: (32750)

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 7.9/10 (18 votes cast)

CQ: design and preview mode toolbar not visible


If you are using the sidekick on an author instance of CQ, you may notice that the toolbar at the bottom which includes the design and preview mode buttons, is not visible or available.


The functionality in the sidekick is determined by the ACLs (Access-Control-Lists) defined in the CQ server.  If you do not have the appropriate privileges then functionality may be hidden in your sidekick.  Sometimes the sidekick may become unstable if you add faulty components to the page, or after you have installed some packages that may have overwritten required objects in your application, breaking some dependencies.


You should first try to clear your browser cache, and then reload the page from WCM console to refresh the sidekick.

You should also ensure you have the correct privileges to access the appropriate design in /etc/designs.  This can be changed by an administrator on the Users tab in the siteadmin console.  If the privileges appear to be correct, then try to disable them, save, and then re-enable them and save.  The sidekick should now display the toolbar again as expected.

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 8.5/10 (4 votes cast)

CQ5.5: how to start the server in debug mode


In CQ5.4 you could start the server in debug mode using the [CQ_HOME]/crx-quickstart/server/server.bat file.  The server folder is no longer there in CQ5.5 on Windows.


To start the server in debug mode you can edit the [CQ_HOME]/crx-quickstart/bin/start.bat file and add the same debug parameters from a server.bat in an existing CQ5.4 installation, or you can use the command line below:

java -Xmx512m -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=30303,suspend=n -jar cq-author-4502.jar


You may notice that the “Attach Debugger” entry in the CRXDE menu is still disabled even after starting the server in debug mode.  You should analyse the console output on server startup to check for issues related to heap/memory problems which may result in a new process being forked.  The debug options used to start the parent JVM are not passed on to the forked process by default.

You can resolve this by adding more heap to the JVM, and/or by specifying the -nofork command line option to prevent forking.  You can also force the forked process to use the parent JVM parameters by specifying the -forkargs [<arg>…] command line option.

You can find more information on the options mentioned above, and other server startup options under the following link:

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 7.7/10 (7 votes cast)

CQ 5.4: how to export the user list as a CSV file


If you are using CQ 5.4 you will notice that the user report is displayed in the browser and you cannot save/export any of the information in this list.

You can view the user report from the “Tools” console in CQ5.  Select “Reports” in the left-hand pane, then double-click the user report in the right-hand pane to open it for viewing and/or configuration.


It is possible to export the user report as CSV content. You can do this in 3 steps.

  1. Overlay the /libs/cq/reporting/components/reportpage/ component to /apps/cq/reporting/components/reportpage/.
    For detailed instructions on how to overlay a component watch the following video:
  2. In /apps/cq/reporting/components/reportpage/body.jsp replace the <body> section with the code in body_code.txt and save the changes.
  3. Navigate to the user report again and now you will see a link at the top to “Export” the content as CSV formatted text. This export function has different behaviour depending on the browser version.

Note: it is important to overlay the reportpage component in “apps”, rather than editing the file in “libs”, as libs is overwritten anytime you install a hotfix or a product update from Adobe, and therefore your changes are lost.  It is a best practice to overlay components to apps, and then you always have a backup of the original component in libs.

reference: (32200)

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 10.0/10 (1 vote cast)