Why I get Error when using the org.apache.poi to create excel File

Hi CUBA Team,

I get the following error when I try to use the org.apache.poi to create excel File

SecurityException: class “org.apache.poi.UnsupportedFileFormatException”'s signer information does not match signer information of other classes in the same package

My java code is :

    package com.company.thepipe.web.screens.jirateam;


import com.company.thepipe.entity.JiraTeam;
import com.company.thepipe.entity.JiraTeamCalendar;
import com.company.thepipe.entity.JiraTeamMember;
import com.haulmont.cuba.core.app.EmailService;
import com.haulmont.cuba.core.app.SchedulingService;
import com.haulmont.cuba.core.global.DataManager;
import com.haulmont.cuba.core.global.EmailException;
import com.haulmont.cuba.core.global.EmailInfo;
import com.haulmont.cuba.gui.Dialogs;
import com.haulmont.cuba.gui.Notifications;
import com.haulmont.cuba.gui.components.Button;
import com.haulmont.cuba.gui.components.DialogAction;
import com.haulmont.cuba.gui.components.Label;
import com.haulmont.cuba.gui.components.ProgressBar;
import com.haulmont.cuba.gui.executors.BackgroundTask;
import com.haulmont.cuba.gui.executors.BackgroundTaskHandler;
import com.haulmont.cuba.gui.executors.BackgroundWorker;
import com.haulmont.cuba.gui.executors.TaskLifeCycle;
import com.haulmont.cuba.gui.model.CollectionContainer;
import com.haulmont.cuba.gui.model.CollectionLoader;
import com.haulmont.cuba.gui.model.InstanceContainer;
import com.haulmont.cuba.gui.screen.*;
import org.apache.poi.*;
import org.json.JSONArray;
import org.json.JSONObject;
import javax.inject.Inject;
import java.io.*;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.xssf.usermodel.*;

public class JiraTeamBrowse extends StandardLookup<JiraTeam> {

    public void onNotClick() throws IOException, ParseException, EmailException {
    
        XSSFWorkbook workbook = new XSSFWorkbook();
        Sheet sheet = workbook.createSheet("Jira Time Tracking");
        Font headerFont = workbook.createFont();
        headerFont.setBold(true);
        headerFont.setFontHeightInPoints((short) 14);
        headerFont.setColor(IndexedColors.RED.getIndex());
        CellStyle headerCellStyle = workbook.createCellStyle();
        headerCellStyle.setFont(headerFont);
        // Create a Row
        Row headerRow = sheet.createRow(0);
        for (i = 0; i < columns.length; i++) {
            Cell cell = headerRow.createCell(i);
            cell.setCellValue(columns[i]);
            cell.setCellStyle(headerCellStyle);
        }

    }
}

In advance thank you,

Kind regards,

PA.

Hello, @pa.bonlieu

Have you changed the apache.poi version?

Regards,
Nikita

Hi @shchienko,

Yes I have now and it’s worked :slight_smile:

Is it something ok from youyr point of view ?

Kind regards,

PA.