title: p:button outcome throws NPE while h:outputLink value works
body: <p>This code works:</p>
  
  <pre><code>&lt;h:outputLink value="/admin/product/read"&gt;
      Navigate
      &lt;f:param name="product" value="#{...}" /&gt;
  &lt;/h:outputLink&gt;
  </code></pre>
  
  <p>But this doesn't:</p>
  
  <pre><code>&lt;p:button outcome="/admin/product/read" value="Navigate"&gt;
      &lt;f:param name="product" value="#{...}" /&gt;
  &lt;/p:button&gt;
  </code></pre>
  
  <p>I am using Prettyfaces so I guess Primefaces isn't able to find the 'file' <code>read</code> in <code>/admin/product</code> and is thus throwing a <code>NullPointerException</code> (upon rendering the page with the <code>p:button</code>) since it cannot match any navigationcase.</p>
  
  <p>I am trying to implement a <code>p:button</code> to produce a GET-request including parameters. I am replacing <code>h:outputLink</code> due to the matching styling of other elements. </p>
  
  <p>What would be the correct way to use <code>p:button</code> (or any other object) to render a Primefaces-style button that will produce a GET-request?</p>
  
  <p><strong>Edit</strong></p>
  
  <p>As requested, the stacktrace:</p>
  
  <pre><code>SEVERE: Error Rendering View[/management/product/edit.xhtml]
  java.lang.NullPointerException
      at org.primefaces.renderkit.OutcomeTargetRenderer.getTargetURL(OutcomeTargetRenderer.java:95)
      at org.primefaces.component.button.ButtonRenderer.buildOnclick(ButtonRenderer.java:98)
      at org.primefaces.component.button.ButtonRenderer.encodeMarkup(ButtonRenderer.java:53)
      at org.primefaces.component.button.ButtonRenderer.encodeEnd(ButtonRenderer.java:32)
      at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:930)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1854)
      at javax.faces.render.Renderer.encodeChildren(Renderer.java:176)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:900)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1847)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1850)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1850)
      at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:443)
      at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
      at com.ocpsoft.pretty.faces.application.PrettyViewHandler.renderView(PrettyViewHandler.java:163)
      at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
      at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
      at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:202)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:646)
      at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:145)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      at mypackage.test.RestrictedAccessFilter.doFilter(RestrictedAccessFilter.java:41)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      at mypackage.common.filter.NoCacheFilter.doFilter(NoCacheFilter.java:38)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:807)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:671)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:505)
      at org.apache.catalina.core.ApplicationDispatcher.doDispatch(ApplicationDispatcher.java:476)
      at org.apache.catalina.core.ApplicationDispatcher.dispatch(ApplicationDispatcher.java:355)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:305)
      at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:137)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      at mypackage.admin.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:46)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      at mypackage.test.RestrictedAccessFilter.doFilter(RestrictedAccessFilter.java:41)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      at mypackage.common.filter.NoCacheFilter.doFilter(NoCacheFilter.java:38)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
      at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
      at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
      at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
      at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
      at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
      at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
      at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
      at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
      at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
      at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
      at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
      at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
      at java.lang.Thread.run(Thread.java:722)
  
  INFO: Exception when handling error trying to reset the response.
  java.lang.NullPointerException
      at org.primefaces.renderkit.OutcomeTargetRenderer.getTargetURL(OutcomeTargetRenderer.java:95)
      at org.primefaces.component.button.ButtonRenderer.buildOnclick(ButtonRenderer.java:98)
      at org.primefaces.component.button.ButtonRenderer.encodeMarkup(ButtonRenderer.java:53)
      at org.primefaces.component.button.ButtonRenderer.encodeEnd(ButtonRenderer.java:32)
      at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:930)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1854)
      at javax.faces.render.Renderer.encodeChildren(Renderer.java:176)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:900)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1847)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1850)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1850)
      at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:443)
      at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
      at com.ocpsoft.pretty.faces.application.PrettyViewHandler.renderView(PrettyViewHandler.java:163)
      at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
      at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
      at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:202)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:646)
      at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:145)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      at mypackage.test.RestrictedAccessFilter.doFilter(RestrictedAccessFilter.java:41)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      at mypackage.common.filter.NoCacheFilter.doFilter(NoCacheFilter.java:38)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:807)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:671)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:505)
      at org.apache.catalina.core.ApplicationDispatcher.doDispatch(ApplicationDispatcher.java:476)
      at org.apache.catalina.core.ApplicationDispatcher.dispatch(ApplicationDispatcher.java:355)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:305)
      at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:137)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      at mypackage.admin.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:46)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      at mypackage.test.RestrictedAccessFilter.doFilter(RestrictedAccessFilter.java:41)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      at mypackage.common.filter.NoCacheFilter.doFilter(NoCacheFilter.java:38)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
      at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
      at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
      at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
      at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
      at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
      at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
      at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
      at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
      at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
      at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
      at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
      at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
      at java.lang.Thread.run(Thread.java:722)
  
  WARNING: ApplicationDispatcher[] PWC1231: Servlet.service() for servlet Faces Servlet threw exception
  java.lang.NullPointerException
      at org.primefaces.renderkit.OutcomeTargetRenderer.getTargetURL(OutcomeTargetRenderer.java:95)
      at org.primefaces.component.button.ButtonRenderer.buildOnclick(ButtonRenderer.java:98)
      at org.primefaces.component.button.ButtonRenderer.encodeMarkup(ButtonRenderer.java:53)
      at org.primefaces.component.button.ButtonRenderer.encodeEnd(ButtonRenderer.java:32)
      at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:930)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1854)
      at javax.faces.render.Renderer.encodeChildren(Renderer.java:176)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:900)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1847)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1850)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1850)
      at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:443)
      at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
      at com.ocpsoft.pretty.faces.application.PrettyViewHandler.renderView(PrettyViewHandler.java:163)
      at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
      at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
      at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:202)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:646)
      at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:145)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      at mypackage.test.RestrictedAccessFilter.doFilter(RestrictedAccessFilter.java:41)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      at mypackage.common.filter.NoCacheFilter.doFilter(NoCacheFilter.java:38)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:807)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:671)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:505)
      at org.apache.catalina.core.ApplicationDispatcher.doDispatch(ApplicationDispatcher.java:476)
      at org.apache.catalina.core.ApplicationDispatcher.dispatch(ApplicationDispatcher.java:355)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:305)
      at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:137)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      at mypackage.admin.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:46)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      at mypackage.test.RestrictedAccessFilter.doFilter(RestrictedAccessFilter.java:41)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      at mypackage.common.filter.NoCacheFilter.doFilter(NoCacheFilter.java:38)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
      at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
      at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
      at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
      at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
      at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
      at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
      at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
      at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
      at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
      at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
      at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
      at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
      at java.lang.Thread.run(Thread.java:722)
  
  WARNING: StandardWrapperValve[default]: PWC1406: Servlet.service() for servlet default threw exception
  java.lang.NullPointerException
      at org.primefaces.renderkit.OutcomeTargetRenderer.getTargetURL(OutcomeTargetRenderer.java:95)
      at org.primefaces.component.button.ButtonRenderer.buildOnclick(ButtonRenderer.java:98)
      at org.primefaces.component.button.ButtonRenderer.encodeMarkup(ButtonRenderer.java:53)
      at org.primefaces.component.button.ButtonRenderer.encodeEnd(ButtonRenderer.java:32)
      at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:930)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1854)
      at javax.faces.render.Renderer.encodeChildren(Renderer.java:176)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:900)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1847)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1850)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1850)
      at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:443)
      at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
      at com.ocpsoft.pretty.faces.application.PrettyViewHandler.renderView(PrettyViewHandler.java:163)
      at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
      at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
      at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:202)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:646)
      at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:145)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      at mypackage.test.RestrictedAccessFilter.doFilter(RestrictedAccessFilter.java:41)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      at mypackage.common.filter.NoCacheFilter.doFilter(NoCacheFilter.java:38)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:807)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:671)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:505)
      at org.apache.catalina.core.ApplicationDispatcher.doDispatch(ApplicationDispatcher.java:476)
      at org.apache.catalina.core.ApplicationDispatcher.dispatch(ApplicationDispatcher.java:355)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:305)
      at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:137)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      at mypackage.admin.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:46)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      at mypackage.test.RestrictedAccessFilter.doFilter(RestrictedAccessFilter.java:41)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      at mypackage.common.filter.NoCacheFilter.doFilter(NoCacheFilter.java:38)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
      at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
      at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
      at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
      at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
      at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
      at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
      at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
      at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
      at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
      at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
      at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
      at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
      at java.lang.Thread.run(Thread.java:722)
  </code></pre>
  
  <p>I've read multiple topics across the web in which is stated that this happens due to the lack of any matching navigationcase, they haven't (yet) taken the effort to throw a better exception.</p>
  
  <p><strong>Matching Prettyfaces cases</strong></p>
  
  <pre><code>&lt;url-mapping id="adminProduct"&gt;
      &lt;pattern value="/admin/product/read" /&gt;
      &lt;view-id value="/management/product/read.xhtml" /&gt;
  &lt;/url-mapping&gt;
  &lt;url-mapping id="adminEditProduct"&gt;
      &lt;pattern value="/admin/product/edit" /&gt;
      &lt;view-id value="/management/product/edit.xhtml" /&gt;
  &lt;/url-mapping&gt;
  
  &lt;rewrite trailingSlash="remove" /&gt;
  </code></pre>
  
  <p>There are many other cases but none of them are relevant in this case. <code>edit.xhtml</code> is the page on which the error is occurring. <code>read.xhtml</code> is the page that is targetted with the given GET-request.</p>