org.apache.poi.xssf.usermodel.XSSFWorkbook NoSuchMethodError

when updating from version 5.2.4 to 5.3 for org.apache.poi. I am receiving errors when creating XSSFWorkbook.
XSSFWorkbook workbook = new XSSFWorkbook(new ByteArrayInputStream(fileInBytes))
I am receiving this error
NoSuchMethodError 'org.apache.commons.io.input.BoundedInputStream$Builder org.apache.commons.io.input.BoundedInputStream.builder()'
Answer
You need to update your version of commons-io to 2.13.0 or higher.
If you're on Maven, modify your pom.xml to something like:
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.13.0</version>
</dependency>
or if you're using Gradle, then make sure to add:
implementation 'commons-io:commons-io:2.13.0'
Enjoyed this article?
Check out more content on our blog or follow us on social media.
Browse more articles