Saturday, 17 January 2015

How to start CQ5 in Debug Mode and map with the eclipse.

To start the CQ5 in debug mode and start debugging in eclipse, work on the following steps..

1. Open the command prompt.

2. Change directories to reach the one where your cq5-author-YourPort.jar (eg. cq5-author-4504.jar) is lying with the license file

3. Paste the  following command to open cq5 in debug mode. This command will also open the GUI of CQ5.

C:\manish\CQ5\cq56\cq5_6_v1> java -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=30303 -XX:+HeapDumpOnOutOfMemoryError -XX:MaxPermSize=256M -Xmx1024m -Dorg.apache.sling.commons.log.level=INFO -jar cq5-author-4504.jar -p 4504 -verbose -nofork -gui

Tuesday, 11 February 2014

1. SlingRepository is NULL

   @Reference
    private SlingRepository repository;

gives me verify error and the repository is NULL.

Answer:
@Reference
private SlingRepository repository;

protected void unbindRepository(SlingRepository repository) {
this.repository = repository;
}