title: NPE primefaces's orderlist on a dedicated server with glassfish, work fine on localhost
body: <p>I launch my web application on localhost via netbeans on a glassfish server. I have no error on the page rankMe.xhtml.
  The deploy of the .war on my dedicated server work fine. But when I try to access to the page <code>rankMe.xhtml</code> with a primefaces orderlist, I have an NPE error.I don't get it.</p>
  
  <pre><code>java.lang.NullPointerException
      at org.primefaces.component.orderlist.OrderListRenderer.encodeOptions(OrderListRenderer.java:150)
      at org.primefaces.component.orderlist.OrderListRenderer.encodeList(OrderListRenderer.java:109)
      at org.primefaces.component.orderlist.OrderListRenderer.encodeMarkup(OrderListRenderer.java:80)
      at org.primefaces.component.orderlist.OrderListRenderer.encodeEnd(OrderListRenderer.java:50)
      at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:924)
      at org.primefaces.renderkit.CoreRenderer.renderChild(CoreRenderer.java:63)
      at org.primefaces.renderkit.CoreRenderer.renderChildren(CoreRenderer.java:47)
      at org.primefaces.component.panel.PanelRenderer.encodeContent(PanelRenderer.java:202)
      at org.primefaces.component.panel.PanelRenderer.encodeMarkup(PanelRenderer.java:119)
      at org.primefaces.component.panel.PanelRenderer.encodeEnd(PanelRenderer.java:56)
      at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:924)
      at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:312)
      at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:115)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:894)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1856)
      at javax.faces.render.Renderer.encodeChildren(Renderer.java:176)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:894)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1856)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
      at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:443)
      at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
      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:219)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:647)
      at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
      at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
      at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
      at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:357)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:260)
      at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:188)
      at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
      at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
      at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
      at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
      at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
      at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
      at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
      at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
      at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
      at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
      at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
      at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
      at java.lang.Thread.run(Thread.java:724)
  </code></pre>
  
  <p>I don't think the code of my xhtml page is necessary but just in case : </p>
  
  <p>In rankMe.xhtml :</p>
  
  <pre><code>&lt;p:orderList value="#{waitingList.recupererWL()}" var="player" controlsLocation="none"  
                                      itemLabel="#{player}" itemValue="#{player}" id="basicList"/&gt;
  </code></pre>
  
  <p>In the CDI bean waitingList : </p>
  
  <pre><code>@Named
  @RequestScoped
  public class WaitingList implements Serializable {
  
      public WaitingList() {
      }
  
      public List&lt;String&gt; recupererWL() {
                  ArrayList&lt;String&gt; players = (ArrayList&lt;String&gt;) FacesContext.getCurrentInstance().getExternalContext().getApplicationMap().get("players");
                  if (players == null) {
                      players = new ArrayList&lt;String&gt;();
                      FacesContext.getCurrentInstance().getExternalContext().getApplicationMap().put("players", players);
                  }
                  return players;
      }
  </code></pre>
  
  <p>Thanks for reading</p>
  
  <p>EDIT : I checked if it was the good .war deployed.So it's not this kind of problem</p>
  
  <p>EDIT2 : Generally, what/where should I look when I have no error on localHost and error on dedicated server ?</p>
  
  <p>EDIT3 : I also notice other stuff do not work. In my opinion , the CDI bean are not create. </p>