2
votes

I am very new to AEM and I am trying to create a AEM project in Eclipse based on certain tutorials from internet.

After installing the AEM plugin by using this url, I tried to create the project. I tried different approaches - some of them failed.

Approach - 1: Mars Eclipse, Java 1.8 and AEM 6.2 Select the Archetype-10, choose Setup new server, enter the server details and deploy it while creating the project, where I got an error "

The server does not support version 2.4 of the J2EE Web module specification.

Approach - 2: Mars Eclipse, Java 1.8 and AEM 6.2 First create the AEM server in the server window Select the Archetype-10, Choose Don't deploy on server, Finish. And then add these projects into the created AEM server. I was able to start the server and publish the projects, but its not reflected in the apps folder of AEM. I am getting an error if I clicked debug button and the error is

org.apache.commons.httpclient.HttpException: Got status code 500 for call to http://localhost:4502/system/sling/tooling/sourceReferences.json

Approach - 3: Luna Eclipse, Java 1.8 and AEM 6.2 I followed the steps in Approach-2. I could see the components published to apps folder of AEM. Again, I could not do debug. I am getting the same error. I could not find any useful materials related to this.

Please let me know where I am making a mistake.

2

2 Answers

11
votes

I got the same issue, but if you double click the server instance in eclipse. It opens up the details, on the right at the end there is a option for Debug. Expand it and uncheck the Resolve sources when connecting. enter image description here Restart the server in debug mode w/o error.

Updates --

Also make sure that your AEM is running in the debug mode, you need to pass debug params to the JVM at start up -

-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n

Above 8000 is the debug port.

You can find more details here

1
votes

Btw you can simply use a "-debug" flag with port number, instead of the lengthy -agentlib....

e.g

java -jar cq-quickstart-6.3.0.jar -r author -p 4502 -debug 30303