Jump to content
  • org.apache.poi.hssf.util.HSSFColor.getTripletHash()Ljava/util/Map;


    esteban5671
    CategoryGeneral
    PriorityUrgent
    ReproducibilityAlways
    ResolutionNo Change Required
    SeverityMinor
    StatusClosed
    Versionv6.9.0

    I trying to generate a report in Excel. I throw the error "org.apache.poi.hssf.util.HSSFColor.getTripletHash () Ljava / util / Map;"

     

    I use poi-3.17 with jasperreports 6.9.0 and your dependencies.

    Netbeans 8.2

     

    public void generateReportEmployeeXLS(String path, int DivisionId) throws ServiceGlobalException {

     

    Map parameters = new HashMap();

    parameters.put("DIVISION_ID", DivisionId);

    this.conectar();

    try {

     

    HttpServletResponse httpServletResponse = (HttpServletResponse) FacesContext.getCurrentInstance().getExternalContext().getResponse();

     

    httpServletResponse.setContentType("application/xls");

    httpServletResponse.addHeader("Content-Type", "application/xls");

     

    JasperReport jasperReport = (JasperReport) JRLoader.loadObjectFromFile(path);

     

    JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, this.getConn());

     

    httpServletResponse.setHeader("Content-Disposition", "inline;filename= Reporte.xls");

     

    JRExporter jrExporter = new JRXlsExporter();

     

    jrExporter.setParameter(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Boolean.TRUE);

    jrExporter.setParameter(JRXlsExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.FALSE);

    jrExporter.setParameter(JRXlsExporterParameter.IS_DETECT_CELL_TYPE, Boolean.TRUE);

     

    jrExporter.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.TRUE);

    jrExporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);

    jrExporter.setParameter(JRExporterParameter.OUTPUT_STREAM, httpServletResponse.getOutputStream());

     

     

     

    if (jrExporter != null) {

    try {

    jrExporter.exportReport();

    } catch (JRException e) {

    e.printStackTrace();

    }

    }

     

    } catch (Exception e) {

    e.printStackTrace();

    } finally {

    if (this.getConn() != null) {

    try {

    this.getConn().close();

    } catch (Exception e) {

    e.printStackTrace();

    }

    }

    }

    this.desconectar();

    }


    Attachments:

    User Feedback

    Recommended Comments

    Changed Resolution from Open to No Change Required

    Changed Status from New to Resolved


    Hi, This is because JasperReports v.6.9.0 requires a POI v.4.0.1 dependency. You'll need to upgrade the POI library in order to solve the issue.
    Link to comment
    Share on other sites


×
×
  • Create New...