Buggy code:
public class DispatcherPortlet extends FrameworkPortlet { public static final String MULTIPART_RESOLVER_BEAN_NAME = "portletMultipartResolver" ; public static final String HANDLER_MAPPING_BEAN_NAME = "handlerMapping" ; public static final String HANDLER_ADAPTER_BEAN_NAME = "handlerAdapter" ; public static final String HANDLER_EXCEPTION_RESOLVER_BEAN_NAME = "handlerExceptionResolver" ; public static final String VIEW_RESOLVER_BEAN_NAME = "viewResolver" ; public static final String DEFAULT_VIEW_RENDERER_URL = "//WEB-INF//servlet//view" ; public static final String ACTION_EXCEPTION_SESSION_ATTRIBUTE = ( DispatcherPortlet . class . getName ( ) ) + ".ACTION_EXCEPTION" ; public static final String ACTION_EXCEPTION_RENDER_PARAMETER = "actionException" ; public static final String PAGE_NOT_FOUND_LOG_CATEGORY = "org.springframework.web.portlet.PageNotFound" ; private static final String DEFAULT_STRATEGIES_PATH = "DispatcherPortlet.properties" ; protected static final Log pageNotFoundLogger = LogFactory . getLog ( DispatcherPortlet . PAGE_NOT_FOUND_LOG_CATEGORY ) ; private static final Properties defaultStrategies ; private boolean detectAllHandlerMappings = true ; private boolean detectAllHandlerAdapters = true ; private boolean detectAllHandlerExceptionResolvers = true ; private boolean detectAllViewResolvers = true ; private String viewRendererUrl = DispatcherPortlet . DEFAULT_VIEW_RENDERER_URL ; private PortletMultipartResolver multipartResolver ; private List < HandlerMapping > handlerMappings ; private List < HandlerAdapter > handlerAdapters ; private List < HandlerExceptionResolver > handlerExceptionResolvers ; private List < ViewResolver > viewResolvers ; public void setDetectAllHandlerMappings ( boolean detectAllHandlerMappings ) { } public void setDetectAllHandlerAdapters ( boolean detectAllHandlerAdapters ) { } public void setDetectAllHandlerExceptionResolvers ( boolean detectAllHandlerExceptionResolvers ) { } public void setDetectAllViewResolvers ( boolean detectAllViewResolvers ) { } public void setViewRendererUrl ( String viewRendererUrl ) { } @ Override public void onRefresh ( ApplicationContext context ) { } protected void initStrategies ( ApplicationContext context ) { } private void initMultipartResolver ( ApplicationContext context ) { } private void initHandlerMappings ( ApplicationContext context ) { } private void initHandlerAdapters ( ApplicationContext context ) { } private void initHandlerExceptionResolvers ( ApplicationContext context ) { } private void initViewResolvers ( ApplicationContext context ) { } protected < T > T getDefaultStrategy ( ApplicationContext context , Class < T > strategyInterface ) { } @ SuppressWarnings ( "unchecked" ) protected < T > List < T > getDefaultStrategies ( ApplicationContext context , Class < T > strategyInterface ) { } protected Object createDefaultStrategy ( ApplicationContext context , Class < ? > clazz ) { } public PortletMultipartResolver getMultipartResolver ( ) { } @ Override protected void doActionService ( ActionRequest request , ActionResponse response ) throws Exception { } @ Override protected void doRenderService ( RenderRequest request , RenderResponse response ) throws Exception { } @ Override protected void doResourceService ( ResourceRequest request , ResourceResponse response ) throws Exception { } @ Override protected void doEventService ( EventRequest request , EventResponse response ) throws Exception { } protected ActionRequest checkMultipart ( ActionRequest request ) throws MultipartException { } protected HandlerExecutionChain getHandler ( PortletRequest request ) throws Exception { } protected void noHandlerFound ( PortletRequest request , PortletResponse response ) throws Exception { } protected HandlerAdapter getHandlerAdapter ( Object handler ) throws PortletException { } protected void exposeActionException ( PortletRequest request , StateAwareResponse response , Exception ex ) { Enumeration < String > paramNames = request . getParameterNames ( ) ; while ( paramNames . hasMoreElements ( ) ) { String paramName = paramNames . nextElement ( ) ; String [ ] paramValues = request . getParameterValues ( paramName ) ; if ( ( paramValues != null ) && ( ! ( response . getRenderParameterMap ( ) . containsKey ( paramName ) ) ) ) { response . setRenderParameter ( paramName , paramValues ) ; } } <START_BUG> response . setRenderParameter ( DispatcherPortlet . ACTION_EXCEPTION_RENDER_PARAMETER , Boolean . TRUE . toString ( ) ) ; <END_BUG> request . getPortletSession ( ) . setAttribute ( DispatcherPortlet . ACTION_EXCEPTION_SESSION_ATTRIBUTE , ex ) ; } protected void render ( ModelAndView mv , PortletRequest request , MimeResponse response ) throws Exception { } protected View resolveViewName ( String viewName , Map model , PortletRequest request ) throws Exception { } protected void doRender ( View view , Map model , PortletRequest request , MimeResponse response ) throws Exception { } protected ModelAndView processHandlerException ( RenderRequest request , RenderResponse response , Object handler , Exception ex ) throws Exception { } protected ModelAndView processHandlerException ( ResourceRequest request , ResourceResponse response , Object handler , Exception ex ) throws Exception { } private void triggerAfterActionCompletion ( HandlerExecutionChain mappedHandler , int interceptorIndex , ActionRequest request , ActionResponse response , Exception ex ) throws Exception { } private void triggerAfterRenderCompletion ( HandlerExecutionChain mappedHandler , int interceptorIndex , RenderRequest request , RenderResponse response , Exception ex ) throws Exception { } private void triggerAfterResourceCompletion ( HandlerExecutionChain mappedHandler , int interceptorIndex , ResourceRequest request , ResourceResponse response , Exception ex ) throws Exception { } private void triggerAfterEventCompletion ( HandlerExecutionChain mappedHandler , int interceptorIndex , EventRequest request , EventResponse response , Exception ex ) throws Exception { } }

Fix:
response . setRenderParameter ( DispatcherPortlet . ACTION_EXCEPTION_RENDER_PARAMETER , ex . toString ( ) ) ;