Expand my Community achievements bar.

SOLVED

Error handling in AEM6.0

Avatar

Level 4

Hi Guys,

I am working in error handling

https://docs.adobe.com/docs/en/aem/6-0/develop/platform/customizing-errorhandler-pages.html

Using above document, I am able to achieve 404 Exception. 

In the case of 500 exception,  I am unable to get 500 error page.

I have followed below steps try to achieve it:

1. Created Exception.jsp under /apps/sling/servlet/errorhandler/Exception.jsp (I tried with Throwable.jsp as well)

2. Added text in between <% Check Exception %> in my component jsp page.

3. When I drag and drop the component in the page. I can see

 java.lang.Error: Unresolved compilation problems: in the page.Instead Exception page.

4. I am running in the WCMMode=disabled mode to check.

Kindly guide me how to see the Exception page.

Thanks

Nanda

1 Accepted Solution

Avatar

Correct answer by
Employee

From the page you mentioned there is caution note stating CQ WCM Debug Filter needs to be disabled on the author instance in order to test the 500 error page, has this been done?

When you look at the request.log file, is your request returning a 500?

View solution in original post

6 Replies

Avatar

Employee Advisor

Hi,

it looks like you struggle rather in creating an exception than in the developing the "exception page" itself. Can you confirm?

kind regards,
Jörg

Avatar

Level 4

I am able to create the exception but the exception is not redirecting to exception page.

Avatar

Correct answer by
Employee

From the page you mentioned there is caution note stating CQ WCM Debug Filter needs to be disabled on the author instance in order to test the 500 error page, has this been done?

When you look at the request.log file, is your request returning a 500?

Avatar

Level 4

Thanks for your reply Opkar

In the request log file I am unable to see the 500 error for my requested URL instead 200 . In the error log file I can see the exceptions in the log file.

What could be the issue?

When I try to test 404 I can see the custom 404 error page still in the request log, I can see response as 200

.Kindly guide me how to resolve the issue,?

.

Avatar

Employee

It is AEM 6.0 you are using, right? 

Did you disable CQ WCM Debug Filterhttp://localhost:4502/system/console/configMgr/com.day.cq.wcm.core.impl.WCMDebugFilter

In your browsers javascript debug console, is the network response a 200 or a 500? How are you generating the 500 response code?