There are times when something is not working as expected from the AEM Server; relax, you are fine. The error can be quickly identified through debugging on the server with a series of steps. Once the error has been identified you can attempt to solve the error efficiently. In this article, I will share with you the basic steps I take to quickly debug an error in AEM; following the order (in steps) will help you optimise and identify the problem quickly.
Common issues you may be experiencing can be:
1. Replication is not replicating properly.
2. Rendered page is missing a component.
3. Rendered page is blank.
4. Servlet is not registered.
1. Analyse Browser’s Console
When there’s an issue, be sure to take a look at the browser’s console log as the first action to take. The console log can show you errors that may help you pinpoint the error immediately, before looking at server logs.
2. Analyse error.log
If the Browser’s console log has no relevant information, we can go ahead to review the error.log; this file can be found from ./crx-quickstart/logs/error.log.
The error.log catches exceptions that are output into the log file. Typically the logs in this file can help you quickly pinpoint the error. Whether the error will be from a bundle by your organisation, a bundle from the AEM product, or even a missing configuration, the logs will expose this information.
3. Analyse .log
When the error.log does not show you the relevant information you can take a look at your custom log files that exist in ./crx-quickstart/logs/*. The custom log files will be able to help you pinpoint your error.