I am using Aspose Email. 21.8. I followed the instructions at Aspose.Email for Java 21.8 Release Notes|Documentation, to use a traversal exceptions callback as follows:
TraversalExceptionsCallback exceptionsCallback = new TraversalExceptionsCallback() {
@Override
public void invoke(TraversalAsposeException exception, String itemId) {
// feedback.report(exception, itemId);
System.out.println(exception.getMessage());
}
};
personalStorage = new PersonalStorage(exceptionsCallback);
if (!personalStorage.load(file.toString()))
throw new IllegalStateException("failed to load pst file "+file+". The PST is likely corrupted.");
However, the above outputs the following:
2021-09-09 05:21:28 c.s.a.i.AsposePSTContainer [DEBUG] failed open
{file=C:\\test.pst}
java.lang.VerifyError: Bad type on operand stack
Exception Details:
Location:
com/aspose/email/TraversalExceptionsCallback.beginInvoke(Lcom/aspose/email/TraversalAsposeException;Ljava/lang/String;Lcom/aspose/email/system/AsyncCallback;Ljava/lang/Object;)Lcom/aspose/email/system/IAsyncResult; @14: invokestatic
Reason:
Type ‘com/aspose/email/zbih’ (current frame, stack[0]) is not assignable to ‘com/aspose/email/internal/ex/zb’
Current Frame:
bci: @14
flags: { }
locals: { ‘com/aspose/email/TraversalExceptionsCallback’, ‘com/aspose/email/TraversalAsposeException’, ‘java/lang/String’, ‘com/aspose/email/system/AsyncCallback’, ‘java/lang/Object’ }
stack: { ‘com/aspose/email/zbih’ }
Bytecode:
0x0000000: bb00 0459 2a2a 2d19 042b 2cb7 0008 b800
0x0000010: 05b0
Could this error be due to code obfuscation on the part of Aspose?