Expand my Community achievements bar.

AEM Logs indicates 404 errors on page load in PROD

Avatar

Level 2

Hi All,

 

I was hoping to understand the reason for these errors in logs on page load in PROD (page loads perfectly fine on Browser) while the case is i dont see any error on trying to replicate the same in local.

 

17.01.2025 14:44:07.615 *ERROR* [66.249.77.69 [1737125047613] GET /content/sample/page/us/en/about.html HTTP/1.1] org.apache.jsp.libs.cq.Page.Page__002e__jsp resource has no content. path=/content/sample/page/us/en/about.html referrer=null

 

17.01.2025 15:36:28.122 *ERROR* [213.230.114.72 [1737128187960] GET /content/sample2/page/sg/en/capacity/solutions.html HTTP/1.1] com.adobe.acs.commons.errorpagehandler.impl.ErrorPageHandlerImpl Exception swallowed while including error page java.lang.NullPointerException: null

 

I tried to check within page.jsp file and Error Page Handler in ACS commons also the associated templates for any broken content but all seems to be fine.

Is this something i need to be concerned over the time as the pages are loading fine currently?

Please let me know if i am missing something.

4 Replies

Avatar

Level 10

The log entries you’re seeing in your AEM Production environment are not necessarily harmful. Here’s a breakdown of what’s happening for each type of message.

“resource has no content”

This log message comes from the OOTB AEM libs/cq/Page/Page.jsp script and indicates that Sling attempted to resolve a resource for /content/... but found no renderable content node under that path. Common reasons include:

  • Bots or crawlers (e.g., Googlebot, as shown by IP 66.249.*) requesting pages with incomplete selectors or extensions.

  • Dispatcher or CDN prefetch requests hitting URL variants (e.g., .html.html or trailing slashes) that do not map to a valid resource.

  • Empty or non-existing “jcr:content” nodes temporarily accessed via system scripts or link checkers.

“Exception swallowed while including error page” 

This log should originate from com.adobe.acs.commons.errorpagehandler.impl.ErrorPageHandlerImpl when the Error Page Handler attempts to include a custom error page, but encounters a NullPointerException.​ Likely causes are:

  • The error handler received a null resource or missing template reference during a 404 or 500 error resolution.

  • The errorPagePath set in the configuration references a node that has been deleted or unavailable for anonymous requests on publish.

  • A misconfigured inheritance rule or path mapping when resolving locale-specific error pages.

Since the exception is explicitly swallowed in ErrorPageHandlerImpl, it’s designed not to disrupt page rendering. As long as users do not see error pages or blank screens, this is generally low priority but worth cleanup verification.

Why it doesn’t reproduce locally

Local environments usually differ from production by:

  • Different content
  • Running as admin users or with higher repository access.

  • Having fewer HTTP interceptors (CDN/Dispatcher not active locally).

  • Fewer or no external crawlers hitting malformed URLs. Hence, requests in PROD likely hit “edge paths” or permission scenarios not encountered locally.​

You can safely continue without emergency intervention, but for hygiene and to prevent log flooding:

  • Confirm that error page paths configured in ACS Commons exist and have read permissions for anonymous users.

  • Verify that templates have valid jcr:content nodes.

  • Review dispatcher logs and rules to ensure unexpected URL variations are rejected before reaching AEM.

Avatar

Level 2

@giuseppebaglio Thanks for the detailed explanation. After digging more i see the whole context and below are the details.

1. i think both these errors are related and the page mentioned in the logs is unpublished.

 

 *ERROR* [104.222.43.7 [1761040329772] GET /content/demo/example/gb/en/about/whereabouts.html HTTP/1.1] com.adobe.acs.commons.errorpagehandler.impl.ErrorPageHandlerImpl Exception swallowed while including error page
java.lang.NullPointerException: null

 

 *ERROR* [104.222.43.7 [1761040329772] GET /content/demo/example/gb/en/about/whereabouts.html HTTP/1.1] org.apache.jsp.libs.cq.Page.Page__002e__jsp resource has no content. path=/content/demo/example/gb/en/about/whereabouts.html referrer=null

 

2. Within the ACS Commons - Error page handler i dont have any error page path included for my DEMO project

Veena1_0-1761213202894.pngVeena1_1-1761213239099.png

3.but i have the errorpages property set to parent page en as below

Veena1_2-1761213524788.png

 

Considering all this i think the resource not found error is due to the page not being published. and nullpointer exception is logged because of the error page path not included in acs handler for demo project and handler trying to check the fallback page . but eventually as part of hierarchy the ACS handler navigates to site specific error page property and renders the 404 page successfully in prod.

please suggest on how to avoid the NPE from getting logged every time the page is hit. or is there anything i am missing here.

 

 

Avatar

Level 10

hi @Veena1,

Configure the errorPagePath or equivalent property in ACS Commons Error Page Handler specifically for your DEMO project, pointing to a published and accessible error page node. This ensures the handler always finds a valid resource, preventing the null lookup and therefore the NPE.

Also, ensure that all referenced error pages (both local and inherited via hierarchy) are published and have read permissions for anonymous users in the environment. 

 

Avatar

Level 2

@giuseppebaglio i got your point its better to include errorpage path in ACS config.  But i would like to highlight that when i hit the /content/demo/example/gb/en/about/whereabouts.html in prod i see a 404 custom page rendered from the errorPage property 

Veena1_0-1761483629571.png

the root page en also has a 404 error page created under its hierarchy.

but the question here is the NPE getting logged because of the wrong value as it is pointing to /content/demo/example/gb/en only while the case is property should have been  /content/demo/example/gb/en/404

Again if this is the case of wrong path then how is the exact 404 page under en is getting rendered in prod. does ACS handler look for 404 error page by default under the specified path in errorpage property. like is this the default behaviour of ACS handler?