title: Migration from Glassfish 3.1 to Glassfish 4.0
body: <p>There seems to be a problem with migrating from Glassfish 3.1 to Glassfish 4.x.</p>
  
  <p>I am currently encountered with the following errors:</p>
  
  <blockquote>
    <p>StandardWrapperValve[DispatcherServlet]: Servlet.service() for servlet DispatcherServlet threw exception java.lang.NullPointerException at com.sun.faces.facelets.tag.TagAttributeImpl.getInt(TagAttributeImpl.java:175) at com.sun.faces.facelets.tag.jstl.core.ForEachHandler.getEnd(ForEachHandler.java:266) at ......................</p>
  </blockquote>
  
  <p>The code responsible for this works perfectly fine in Glassfish 3.1 but now fails in 4.x.</p>
  
  <p>I've tried this answer out but no luck : <a href="https://stackoverflow.com/questions/5225013/coerce-to-zero-at-runtime">How to set -Dorg.apache.el.parser.COERCE_TO_ZERO=false programmatically</a></p>
  
  <p>Anyone who has encountered this issue?</p>
  
  <p>Here is part of my applicationContext.xml stating the solution on the tutorial:</p>
  
  <pre><code>&lt;bean id="trustStore" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean"&gt;
              &lt;property name="targetObject" value="#{@systemProperties}" /&gt;
              &lt;property name="targetMethod" value="putAll" /&gt;
              &lt;property name="arguments"&gt;
                  &lt;props&gt;
  
                      &lt;prop key="org.apache.el.parser.COERCE_TO_ZERO"&gt;false&lt;/prop&gt;
                  &lt;/props&gt;
              &lt;/property&gt;
          &lt;/bean&gt;
  </code></pre>
  
  <p>Thank you.</p>