While creating an object of HSSFWorkbook, getting the error message. HSSFWorkbook new_workbook1 = new HSSFWorkbook(); Error Message: "error": "Internal Server Error", "message": "org.apache.logging.log4j.Logger.atDebug()Lorg/apache/logging/log4j/LogBuilder;", "trace": "java.lang.NoSuchMethodError: org.apache.logging.log4j.Logger.atDebug()Lorg/apache/logging/log4j/LogBuilder;\r\n\tat org.apache.poi.hssf.model.InternalWorkbook.createWorkbook(InternalWorkbook.java:330)\r\n\tat org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:242)
The log4j-api jar you have in your classpath does not match the one that poi needs. Or you have more than 1 log4j-api jar. Latest versions of POI (5.2.x) need log4j-api 2.17.x
Likely caused by an invalid classpath, thus closing this for now, please reopen with more information if you still think there is a problem in Apache POI here.