title: java.lang.NoSuchMethodError: org.apache.poi.hssf.usermodel.HSSFSheet.setColumnWidth(II)V
body: <p>I am trying to generate Jasper Excel report.I am getting the exception like </p>
  
  <pre><code>java.lang.NoSuchMethodError: org.apache.poi.hssf.usermodel.HSSFSheet.setColumnWidth(II)V
  at net.sf.jasperreports.engine.export.JRXlsExporter.setColumnWidth(JRXlsExporter.java:212)
  at net.sf.jasperreports.engine.export.JRXlsAbstractExporter.setColumnWidths(JRXlsAbstractExporter.java:654)
  at net.sf.jasperreports.engine.export.JRXlsAbstractExporter.exportPage(JRXlsAbstractExporter.java:527)
  at net.sf.jasperreports.engine.export.JRXlsAbstractExporter.exportReportToStream(JRXlsAbstractExporter.java:423)
  at net.sf.jasperreports.engine.export.JRXlsAbstractExporter.exportReport(JRXlsAbstractExporter.java:207)
  at com.pagesolutions.controller.ReportingController.doGet(ReportingController.java:177)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
  at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
  at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
  at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
  at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074)
  at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
  at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
  at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
  at java.lang.Thread.run(Thread.java:745)
  </code></pre>
  
  <p>My Java code</p>
  
  <pre><code>if(formatType.matches("XLS")){
              String jrxml = "/home/madhu/report1.jrxml";
              list = (List&lt;Reports&gt;) session.getAttribute("customersList");
              //InputStream input = Thread.currentThread().getContextClassLoader().getResourceAsStream(jrxml);
              try {
                  //jasperReport = JasperCompileManager.compileReport(jrxml);
                  //jasperDesign = JRXmlLoader.load(jrxml);
                  jasperReport = JasperCompileManager.compileReport(jrxml);
                  JRDataSource datasource = new JRBeanCollectionDataSource(list, true);
                  jasperPrint = JasperFillManager.fillReport(jasperReport, null, datasource);
                  String output="/home/madhu/reports/report.xls";
                  //JasperExportManager.exportReportToPdfFile(jasperPrint, output);
                  JRXlsExporter exporterXLS = new JRXlsExporter();
                  exporterXLS.setParameter(JRXlsExporterParameter.JASPER_PRINT, jasperPrint);
                  exporterXLS.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.TRUE);
                  exporterXLS.setParameter(JRXlsExporterParameter.IS_DETECT_CELL_TYPE, Boolean.TRUE);
                  exporterXLS.setParameter(JRXlsExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.FALSE);
                  exporterXLS.setParameter(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Boolean.TRUE);
                  exporterXLS.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, output);
                  exporterXLS.exportReport();
                   ServletOutputStream servletOutputStream = response.getOutputStream();
                   String fileName = "report.xls";
                   FileInputStream fileToDownload = new FileInputStream(output);
                   response.setContentType("application/vnd.ms-excel");
                   response.setHeader("Content-Disposition", "attachment; filename="+ fileName);
                   ByteArrayOutputStream output1 = new ByteArrayOutputStream(); 
                   int readBytes = 0;
                   byte[] buffer = new byte[10000];
                   while ((readBytes = fileToDownload.read(buffer, 0, 10000)) != -1) {
                       servletOutputStream.write(buffer, 0, readBytes);
                   }
  
                   output1.flush();
                   output1.close();
                   fileToDownload.close();
              } catch (JRException e) {
                  // TODO Auto-generated catch block
                  e.printStackTrace();
              }
          }
  </code></pre>
  
  <p>I already added poi-3.2-FINAL.jar file in my lib but still getting the above exception</p>
  
  <p>Can any one help me please.... </p>