title: how to handle error readJavaFormatString(FloatingDecimal.java:991)
body: <p>I am trying to convert the string to Double like:</p>
  
  <pre><code>Double no_of_leaves_form=Double.parseDouble(leaveapplyform.getNo_of_leaves());
  </code></pre>
  
  <p>and data type of NO_of_leaves in database is varchar.
  but I am getting the following error:</p>
  
  <pre><code> java.lang.NullPointerException
      at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:991)
      at java.lang.Double.parseDouble(Double.java:510)
      at com.dz.hrportal.worker.EmpLeaveApplyWorker.validateUser(EmpLeaveApplyWorker.java:42)
      at com.dz.hrportal.controller.EmpLeaveApplyController.processForm(EmpLeaveApplyController.java:63)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
  </code></pre>
  
  <p>does any one know how to solve it.</p>