Highlighted

How to handle Exception in JSP related to JSP include using "cq:include"

Guptasuresh2004

23-10-2017

Hi All,

can you guys suggest -How to handle  Exception in JSP related to JSP include using "cq:include"

logs:

12.10.2017 13:40:28.401 *ERROR* [10.1.239.240 [1507815628327] GET /content/brand/en_us/home/turnto-mobile.html HTTP/1.1 StartTime "2017-10-12 13:40:28.371" RequestURI "/content/brand/en_us/home/turnto-mobile.html" Token "null"] com.day.cq.wcm.tags.IncludeTag Error while executing script head.jsp org.apache.sling.api.scripting.ScriptEvaluationException: java.lang.NullPointerException at org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:388) at org.apache.sling.scripting.core.impl.DefaultSlingScript.eval(DefaultSlingScript.java:171) at org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:463) at com.day.cq.wcm.tags.IncludeTag.includeScript(IncludeTag.java:176) at com.day.cq.wcm.tags.IncludeTag.doEndTag(IncludeTag.java:93) at org.apache.jsp.apps.brandParent_002diea.pagecomponents.flexibleLayoutBasePage.flexibleLayoutBasePage_jsp._jspx_meth_cq_005finclude_005f0(flexibleLayoutBasePage_jsp.java:226) at org.apache.jsp.apps.brandParent_002diea.pagecomponents.flexibleLayoutBasePage.flexibleLayoutBasePage_jsp._jspService(flexibleLayoutBasePage_jsp.java:198) at org.apache.sling.scripting.jsp.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:725) at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:502) at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:449) at org.apache.sling.scripting.jsp.JspScriptEngineFactory.callJsp(JspScriptEngineFactory.java:284) at org.apache.sling.scripting.jsp.JspScriptEngineFactory.access$100(JspScriptEngineFactory.java:102) at org.apache.sling.scripting.jsp.JspScriptEngineFactory$JspScriptEngine.eval(JspScriptEngineFactory.java:536) at org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:361) at org.apache.sling.scripting.core.impl.DefaultSlingScript.eval(DefaultSlingScript.java:171) at org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:463) at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:547) at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:44) at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:77) at com.day.cq.wcm.core.impl.WCMDeveloperModeFilter.doFilter(WCMDeveloperModeFilter.java:117) at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68) at com.adobe.acs.commons.wcm.impl.ComponentErrorHandlerImpl.doFilter(ComponentErrorHandlerImpl.java:209) at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68) at com.day.cq.wcm.core.impl.WCMDebugFilter.doFilter(WCMDebugFilter.java:138) at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68) at com.cognifide.cq.includefilter.DynamicIncludeFilter.doFilter(DynamicIncludeFilter.java:82) at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68) at

Thanks,

Suresh

Replies

Highlighted

smacdonald2008

24-10-2017

Not sure what you mean - when an Exception is thrown - there is a error condition somewhere. Identify the error and address the cause. Now in this case - is the error coming from a JSP that comes with AEM or a custom JSP.