title: Error in WebSphere 8.5 + Mojarra + MyFaces2 + Spring webflow
body: <p>I am trying to deploy a web application in WebSphere 8.5. The app has the following characteristics.</p>
  
  <ul>
  <li>Mojarra 2.1.13</li>
  <li>Primefaces 3.4.2</li>
  <li>spring webflow 2.3.1</li>
  <li>spring 3.1.2</li>
  <li>jdk 1.6</li>
  </ul>
  
  <p>This app works very well into Tomcat 7 but when we try to deploy it into WebSphere we got a <code>NullPointerException</code> with the following stacktrace.</p>
  
  <pre><code>javax.faces.component.UIComponentBase.restoreDeltaSystemEventListenerClassMap(UIComponentBase.java:1933)
  javax.faces.component.UIComponentBase.restoreState(UIComponentBase.java:1765)
  javax.faces.component.UIViewRoot.restoreState(UIViewRoot.java:1214)
  javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1401)
  javax.faces.component.UIViewRoot.processRestoreState(UIViewRoot.java:731)
  org.springframework.faces.webflow.FlowViewStateManager.restoreComponentState(FlowViewStateManager.java:78)
  org.springframework.faces.webflow.FlowViewStateManager.restoreView(FlowViewStateManager.java:203)
  org.apache.myfaces.shared_impl.view.ViewDeclarationLanguageBase.restoreView(ViewDeclarationLanguageBase.java:106)
  org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.restoreView(FaceletViewDeclarationLanguage.java:1438)
  org.apache.myfaces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:278)
  org.springframework.faces.webflow.FlowViewHandler.restoreFlowView(FlowViewHandler.java:144)
  org.springframework.faces.webflow.FlowViewHandler.restoreView(FlowViewHandler.java:83)
  org.springframework.faces.webflow.JsfViewFactory.getView(JsfViewFactory.java:105)
  org.springframework.webflow.engine.ViewState.resume(ViewState.java:193)
  org.springframework.webflow.engine.Flow.resume(Flow.java:545)
  org.springframework.webflow.engine.impl.FlowExecutionImpl.resume(FlowExecutionImpl.java:258)
  org.springframework.webflow.executor.FlowExecutorImpl.resumeExecution(FlowExecutorImpl.java:169)
  org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:183)
  org.springframework.faces.webflow.JsfFlowHandlerAdapter.handle(JsfFlowHandlerAdapter.java:48)
  org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
  org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
  org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
  org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
  com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1214)
  com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:774)
  com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:456)
  com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
  com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:125)
  com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:92)
  org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
  org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
  org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
  org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
  org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
  org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
  org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
  org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
  org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
  org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
  org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
  org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
  org.springframework.security.web.authentication.preauth.AbstractPreAuthenticatedProcessingFilter.doFilter(AbstractPreAuthenticatedProcessingFilter.java:88)
  org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
  org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
  org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
  org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
  org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
  org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
  org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
  org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
  org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
  com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:192)
  com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:89)
  com.csc.fsg.pcdSecurity.filter.CASFilter.doFilter(CASFilter.java:573)
  com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:192)
  com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:89)
  org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
  org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
  com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:192)
  com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:89)
  com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:926)
  com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1023)
  com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:87)
  com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:895)
  com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
  com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:195)
  com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
  com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:522)
  com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:311)
  com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:87)
  com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
  com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
  com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
  com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
  com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
  com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
  com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
  com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1783)
  </code></pre>
  
  <p>I see that the error is coming from MyFaces2, JSF implementation by default into websphere 8.5, so I tried to implement Mojarra 2.1.13 as a shared lib but it did not work (I followed the steps from IBM docs).</p>
  
  <p>The other odd thing is that the app rendered the main page but when it is rendering suddenly this error shows up.</p>
  
  <ul>
  <li>Does someone know something about this error?</li>
  </ul>