title: Handler dispatch failed; nested exception is java.lang.AbstractMethodError: javax.xml.parsers.DocumentBuilderFactory.setFeature(Ljava/lang/String;Z)V
body: <h2>The Pre-Requisites</h2>
  
  <p>I have recently upgraded from JasperReports version <strong>3.7.6</strong> to <strong>6.4.1</strong>. JasperReports-fonts remains at version <strong>5.6.1</strong>. I have also made sure to update the core dependencies for each project, and they are now included in the Maven build.</p>
  
  <p>I have a JavaSE-1.8 build path for my server, and this matches my environment too. </p>
  
  <p>The updated Jasper Maven dependencies in the pom.xml are as follows.</p>
  
  <pre><code>&lt;dependency&gt;
          &lt;groupId&gt;net.sf.jasperreports&lt;/groupId&gt;
          &lt;artifactId&gt;jasperreports-fonts&lt;/artifactId&gt;
          &lt;version&gt;5.6.1&lt;/version&gt;
          &lt;type&gt;jar&lt;/type&gt;
          &lt;scope&gt;compile&lt;/scope&gt;
  &lt;/dependency&gt;  
  
  &lt;dependency&gt;
          &lt;groupId&gt;net.sf.jasperreports&lt;/groupId&gt;
          &lt;artifactId&gt;jasperreports&lt;/artifactId&gt;
          &lt;version&gt;6.4.1&lt;/version&gt;
          &lt;type&gt;jar&lt;/type&gt;
          &lt;scope&gt;compile&lt;/scope&gt;
  &lt;/dependency&gt; 
  </code></pre>
  
  <p>I realise this is a big version jump and we are bound to encounter some errors, but Maven builds and compiles the .jrxml report files <strong>successfully</strong>. However, I am getting an exception when trying to run the report from my client. </p>
  
  <hr>
  
  <h2>The Exception</h2>
  
  <p>Message:</p>
  
  <pre><code>Handler dispatch failed; nested exception is java.lang.AbstractMethodError: javax.xml.parsers.DocumentBuilderFactory.setFeature(Ljava/lang/String;Z)V
  </code></pre>
  
  <p>Description: </p>
  
  <pre><code>The server encountered an internal error that prevented it from fulfilling this request.
  </code></pre>
  
  <p>Exception: </p>
  
  <pre><code>org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.AbstractMethodError: javax.xml.parsers.DocumentBuilderFactory.setFeature(Ljava/lang/String;Z)V
  org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:982)
  org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)
  org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
  org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
  org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
  org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
  org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317)
  org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
  org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
  org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
  org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)
  </code></pre>
  
  <p>Root cause:</p>
  
  <pre><code>java.lang.AbstractMethodError: javax.xml.parsers.DocumentBuilderFactory.setFeature(Ljava/lang/String;Z)V
  net.sf.jasperreports.engine.fonts.SimpleFontExtensionHelper.&lt;init&gt;(SimpleFontExtensionHelper.java:149)
  net.sf.jasperreports.engine.fonts.SimpleFontExtensionHelper.getInstance(SimpleFontExtensionHelper.java:131)
  net.sf.jasperreports.engine.fonts.FontExtensionsRegistry.ensureFontExtensions(FontExtensionsRegistry.java:80)
  net.sf.jasperreports.engine.fonts.FontExtensionsRegistry.getExtensions(FontExtensionsRegistry.java:57)
  net.sf.jasperreports.extensions.DefaultExtensionsRegistry.getExtensions(DefaultExtensionsRegistry.java:115)
  net.sf.jasperreports.engine.util.JRStyledTextParser.&lt;clinit&gt;(JRStyledTextParser.java:86)
  net.sf.jasperreports.engine.fill.JRBaseFiller.&lt;init&gt;(JRBaseFiller.java:110)
  net.sf.jasperreports.engine.fill.JRVerticalFiller.&lt;init&gt;(JRVerticalFiller.java:69)
  net.sf.jasperreports.engine.fill.JRVerticalFiller.&lt;init&gt;(JRVerticalFiller.java:57)
  net.sf.jasperreports.engine.fill.JRFiller.createBandReportFiller(JRFiller.java:200)
  net.sf.jasperreports.engine.fill.JRFiller.createReportFiller(JRFiller.java:215)
  net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:115)
  net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:667)
  net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:648)
  net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:970)
  </code></pre>