We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

IndexOutOfRangeException while reading PST file(Aspose.Email For Java API)

Hi Team,
I am trying to read PST file using Aspose But i get below exception while reading the pst file.

Source code :-

MapiMessage f_objMapiMessage = null;
IGenericEnumerable f_mapiMessageCollection =
p_objFolderInfo.enumerateMapiMessages();
IGenericEnumerator f_Iterator = null;

f_Iterator = f_mapiMessageCollection.iterator();

while(f_Iterator.hasNext())
{
f_objMapiMessage = f_Iterator.next();
if (f_objMapiMessage != null && f_objMapiMessage.getMessageClass().equals(“IPM.Note”))
{
raiseEvent(f_objMapiMessage,p_objFolder); // this is my side custom function , not aspose function
}
}

Exception :-

class com.aspose.email.system.exceptions.IndexOutOfRangeException: Index was outside the bounds of the array.
com.aspose.email.internal.ac.t.b(Unknown Source)
com.aspose.email.vy.a(SourceFile:278)
com.aspose.email.ayv.g(SourceFile:309)
com.aspose.email.aoq.c(SourceFile:2221)
com.aspose.email.aoq.a(SourceFile:1734)
com.aspose.email.aoq.a(SourceFile:276)
com.aspose.email.aoq$c.hasNext(SourceFile:3329)
SysTools.PSTReader.getAllMailsFrom(PSTReader.java:535)
SysTools.PSTReader.traverse(PSTReader.java:464)
SysTools.PSTReader.traverse(PSTReader.java:505)
SysTools.PSTReader.traverse(PSTReader.java:505)
SysTools.PSTReader.loadPST(PSTReader.java:445)
SysTools.PSTReader.scan(PSTReader.java:206)
Control.Converter.convert(Converter.java:1089)
View.ExportManager.startExporting(ExportManager.java:177)
View.WorkerThread.run(WorkerThread.java:44)

@kharade.a,

Thank you for contacting Aspose support team.

Could you please send us the sample PST file? It will help us to observe the problem and provide assistance accordingly.

We have large sample of PST. so i cant sent that sample. (I have 2 GB of PST sample).

@kharade.a,

You may please upload it on some file sharing server and share the link and password with us. We will download PST and test it here. I am afraid, that without the sample PST, it is not possible to observe the issue and provide assistance.