title: Jasper reports HtmlComponent class not found
body: <p>I have designed a simple report by putting HTML palette using iReport. When I run the report i get this exception:</p>
  
  <p>Caused by: java.lang.ClassNotFoundException: net.sf.jasperreports.components.html.HtmlComponent from [Module "deployment.myProject.war:main" from Service Module Loader]</p>
  
  <p>I am using this code.</p>
  
  <pre><code>InputStream is;
  JasperReport jReport = null;
  JasperPrint jPrint = null;
  
  if (Utils.isEmpty(dataList)) {
      throw new Exception("No data to fill");
  }
  
  try {
      is = Thread.currentThread().getContextClassLoader().getResourceAsStream("/templates/jr/myfile.jasper");
      if (is != null) {
          jReport = (JasperReport) JRLoader.loadObject(is);
      }
      if (jReport != null) {
          if ("JDBC".equalsIgnoreCase(dataSrc)) {
              Connection con = ((DataSource) (new InitialContext().lookup(""))).getConnection();
              jPrint = JasperFillManager.fillReport(jReport, params, con);
          } else if ("JAVABEAN".equalsIgnoreCase(dataSrc)) {
              JRBeanCollectionDataSource jrDataSource = new JRBeanCollectionDataSource(dataList);
              jPrint = JasperFillManager.fillReport(jReport, params, jrDataSource);
          }
      }
  } catch (Exception e) {
      System.out.println(e.getMessage());
      throw new Exception("Error generating JR Template:" + templateName, e);
  }
  </code></pre>
  
  <p>I got exception in this line : </p>
  
  <pre><code>jReport = (JasperReport) JRLoader.loadObject(is);
  </code></pre>
  
  <p>I have checked the jasperReports.jar and found that there is no htmlComponent class. I also use latest version of jasperReport library(i.e 6.1.0) and there is no net.sf.jasperreports.components. html.HtmlComponent class in it. Anyone please help me how to include them into my project with netbeans ???</p>
  
  <p><strong>EDIT 1 :</strong> I have included the htmlComponent jar into my maven web project as dependency in pom.xml file using this code: </p>
  
  <pre><code>     &lt;dependency&gt;
       &lt;groupId&gt;net.sf.jasperreports&lt;/groupId&gt;
       &lt;artifactId&gt;htmlcomponent&lt;/artifactId&gt;
       &lt;scope&gt;system&lt;/scope&gt;
       &lt;version&gt;1.0&lt;/version&gt;
       &lt;systemPath&gt;${basedir}/src/lib/htmlcomponent.jar&lt;/systemPath&gt;
       &lt;/dependency&gt;
  </code></pre>
  
  <p>Now my dependency structure looks like this:</p>
  
  <p><img src="https://i.stack.imgur.com/FsNQv.png" alt="enter image description here"></p>
  
  <p>You can see the htmlComponent dependency contains the net.sf.jasperreports.components.html.HtmlComponent class. But i am still getting the same error. Please help. </p>