I tried to get file format information from the byte array of the attached password protected workbook using the below mention code:
// byte inputDoc is the byte array of the workbook.
final InputStream fileStream = new ByteArrayInputStream(inputDoc);
FileFormatInfo info = FileFormatUtil.detectFileFormat(fileStream);
I get NoClassDefFoundError with “org/bouncycastle/jce/provider/BouncyCastleProvider” as the cause.
I was earlier using 8.7.1 version of cells where I wasn’t seeing this exception with the exact same lines of code.
My environment details: Oracle Linux 5 (Intel 64-bit)
Java version: 1.7.0_85(default)
Java SE version: 1.7.0_85 (default)
Aspose cells for java version: 17.3.5