title: JSF 2.0 command button generates NullPointerException
body: <p>I'm using primefaces 2.2.1 with JSF 2.0.  I have a page with various labels to display data, some listboxes and a couple of commandButtons.  No matter what I do, whenever I click on a command button in this page, I get the following error:</p>
  
  <pre><code>java.lang.NullPointerException
      at org.primefaces.component.inputmask.InputMaskRenderer.getConvertedValue(InputMaskRenderer.java:115)
      at javax.faces.component.UIInput.getConvertedValue(UIInput.java:1030)
      at javax.faces.component.UIInput.validate(UIInput.java:960)
      at javax.faces.component.UIInput.executeValidate(UIInput.java:1233)
      at javax.faces.component.UIInput.processValidators(UIInput.java:698)
      at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1214)
      at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1214)
      at javax.faces.component.UIForm.processValidators(UIForm.java:253)
      at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1214)
      at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1214)
      at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:1172)
      at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:76)
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:409)
      at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1534)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
      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:215)
      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 com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
      at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
      at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:326)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:227)
      at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:170)
      at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822)
      at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)
      at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013)
      at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
      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:619)
  </code></pre>
  
  <p>I have no idea why.  Anyone has an idea of what might be causing this?  I am also using entity classes and a managed bean for this page. This is part of the JSF Page:  The error occurs whenever a command button is clicked.</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='UTF-8' ?&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/   xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:p="http://primefaces.prime.com.tr/ui"
        xmlns:ui="http://java.sun.com/jsf/facelets"&gt;
  
      &lt;f:view&gt;
          &lt;h:head&gt;
              &lt;link rel="stylesheet" type="text/css" href="../resources/css/masterpage.css" /&gt;
              &lt;link rel="stylesheet" type="text/css" href="../resources/css/requests.css" /&gt;
          &lt;/h:head&gt;
          &lt;h:body&gt;
              &lt;h:form prependId="false" &gt;
                  &lt;p:growl id="messages" showDetail="true"/&gt;
                  &lt;p:panel id="pnlMain" widgetVar="pnlMain" style="width: 100%; font-size: 15px; text-align: left" header="Request Detail"&gt;
                 .
                 .
                 .
                      &lt;table&gt;
                          &lt;tr&gt;
                              &lt;td valign="top"&gt;
  
                              &lt;/td&gt;
                              &lt;td align="right"&gt;
                                  &lt;p:commandButton id="btnViewComment" widgetVar="btnViewComment" ajax="false" value="View Selected" /&gt;
                              &lt;/td&gt;
                              &lt;td&gt;
  
                              &lt;/td&gt;
                          &lt;/tr&gt;
                      &lt;/table&gt;
                      &lt;p:panel id="pnlSupportingDocs" widgetVar="pnlSupportingDocs" header="Supporting Documents" &gt;
                          &lt;div&gt;
                              &lt;table&gt;
                                  &lt;tr&gt;
                                      &lt;td valign="top" &gt;
                                          &lt;h:selectOneListbox id="lstDocs" style="width: 300px; height: 100px" value="#{MyDocuments.doId}" &gt;
                                              &lt;f:selectItems value="#{RequestSearch.selectedRequest.documentCollection}" var="d" itemLabel="#{d.doName}" itemValue="#{d.doId}" /&gt;
                                          &lt;/h:selectOneListbox&gt;
                                      &lt;/td&gt;
                                      &lt;td valign="bottom" &gt;
                                          &lt;table&gt;
                                              &lt;tr&gt;
                                                  &lt;td&gt;
                                                      &lt;p:commandButton id="btnViewSelected" style="font-size: 8px; width: 150px" widgetVar="btnViewSelected" value="View Selected" /&gt;
                                                  &lt;/td&gt;
                                              &lt;/tr&gt;
                                              &lt;tr&gt;
                                                  &lt;td&gt;
                                                      &lt;p:commandButton id="btnRemoveSelected" style="font-size: 8px; width: 150px" widgetVar="btnRemoveSelected" value="Remove Selected" /&gt;
                                                  &lt;/td&gt;
                                              &lt;/tr&gt;
                                              &lt;tr&gt;
                                                  &lt;td&gt;
                                                      &lt;p:fileUpload id="btnNewDoc" widgetVar="btnNewDoc" update="messages" allowTypes="*.*" description="All Files" fileUploadListener="#{MyDocuments.handleFileUpload}" /&gt;
                                                  &lt;/td&gt;
                                              &lt;/tr&gt;
                                          &lt;/table&gt;
                                      &lt;/td&gt;
                                  &lt;/tr&gt;
                              &lt;/table&gt;
                          &lt;/div&gt;
                      &lt;/p:panel&gt;
                      &lt;p:panel id="pnlFinalization" widgetVar="pnlFinalization" header="Final Evaluation" &gt;
                          &lt;table&gt;
                              &lt;tr&gt;
                                  &lt;td valign="top" &gt;
                                      &lt;h:outputLabel id="lblComments" style="font-size: 12px" value="Comments:" /&gt;
                                  &lt;/td&gt;
                                  &lt;td&gt;
                                      &lt;p:inputTextarea id="txtComments" widgetVar="txtComments" style="width: 300px" maxHeight="600" /&gt;
                                  &lt;/td&gt;
                              &lt;/tr&gt;
                          &lt;/table&gt;
                          &lt;table&gt;
                              &lt;tr&gt;
                                  &lt;td&gt;
                                      &lt;h:outputLabel id="lblFinalAdjAmt" style="font-size: 12px" value="Final Adjustment Amt:" /&gt;
                                  &lt;/td&gt;
                                  &lt;td&gt;
                                      &lt;p:inputMask id="txtFinalAdjAmt" widgetVar="txtFinalAdjAmt" mask="$9999999.99" style="width: 100px; text-align: right" maxlength="15" /&gt;
                                  &lt;/td&gt;
                                  &lt;td width="100px" &gt;
  
                                  &lt;/td&gt;
                                  &lt;td&gt;
                                      &lt;h:outputLabel id="lblFinalStatus" style="font-size: 12px" value="Final Status:" /&gt;
                                  &lt;/td&gt;
                                  &lt;td&gt;
                                      &lt;h:selectOneMenu id="cmbStatus" value="#{theStatus.reqStatus}" &gt;
                                          &lt;f:selectItems value="#{theStatus.finalStatus}" /&gt;
                                      &lt;/h:selectOneMenu&gt;
                                  &lt;/td&gt;
                                  &lt;td&gt;
                                      &lt;p:commandButton id="btnSave" widgetVar="btnSave" value="Save" /&gt;
                                  &lt;/td&gt;
                              &lt;/tr&gt;
                          &lt;/table&gt;
                      &lt;/p:panel&gt;
                  &lt;/p:panel&gt;
                  &lt;p:dialog header="Print Forms" id="pf" widgetVar="pf" modal="true" width="450" height="300"&gt;  
                      &lt;iframe src="../PopUpPages/FormMenu.jsf" width="400" height="250" /&gt;
                  &lt;/p:dialog&gt;
                  &lt;p:dialog header="Comment Detail" id="cd" widgetVar="cd" modal="true" width="450" height="300" &gt;
  
                  &lt;/p:dialog&gt;
                  &lt;p:dialog header="Supporting Documents" id="sd" widgetVar="sd" modal="true" width="600" height="800" &gt;
                      &lt;iframe src="../PopUpPages/SupportingDoc.jsf" width="590" height="650" scrolling="true" /&gt;
                  &lt;/p:dialog&gt;
              &lt;/h:form&gt;
          &lt;/h:body&gt;
      &lt;/f:view&gt;
  &lt;/html&gt;
  </code></pre>