Free Support Forum - aspose.com

KeyNotFoundException splitting a PST


#1

When I try the sample code to split PSTs, for some PSTs I get an exception. I’ve attached a pst that will generate this error.

System.Collections.Generic.KeyNotFoundException was unhandled
HResult=-2146232969
Message=The given key was not present in the dictionary.
Source=mscorlib
StackTrace:
at System.Collections.Generic.Dictionary2.get_Item(TKey key) at Aspose.Email.Storage.Pst.PersonalStorage.#=zk7KvdWUGVy9w(FolderInfo #=z2vPL31BwVP65, #=zwUvA8Q9xRKFnT6B7CmwdYgVnEm7LG9PAtg==& #=zSJFlmDQ=, Dictionary2 #=zeGHhmy8=)
at Aspose.Email.Storage.Pst.PersonalStorage.#=zjjilA$9142XP(FolderInfo #=zNR$UhOo4I4gi, #=zwUvA8Q9xRKFnT6B7CmwdYgVnEm7LG9PAtg==& #=zSJFlmDQ=, Dictionary2 #=zeGHhmy8=) at Aspose.Email.Storage.Pst.PersonalStorage.#=zk7KvdWUGVy9w(FolderInfo #=z2vPL31BwVP65, #=zwUvA8Q9xRKFnT6B7CmwdYgVnEm7LG9PAtg==& #=zSJFlmDQ=, Dictionary2 #=zeGHhmy8=)
at Aspose.Email.Storage.Pst.PersonalStorage.#=zjjilA$9142XP(FolderInfo #=zNR$UhOo4I4gi, #=zwUvA8Q9xRKFnT6B7CmwdYgVnEm7LG9PAtg==& #=zSJFlmDQ=, Dictionary`2 #=zeGHhmy8=)
at Aspose.Email.Storage.Pst.PersonalStorage.SplitInto(Int64 chunkSize, String path)
at ConsoleApplication3.Program.Main(String[] args) in c:\users\gjanco\documents\visual studio 2015\Projects\ConsoleApplication3\ConsoleApplication3\Program.cs:line 18
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:

I am running the following code:
Aspose.Email.License license = new Aspose.Email.License();
license.SetLicense(@“D:\impt\aspose.lic”);

        PersonalStorage pst = PersonalStorage.FromFile("D:\\TestFiles\\pst\\types.pst");
        pst.SplitInto(3000000, "D:\\TestFiles\\split");

#2

@GregoryJanco

We are unable to find any PST attachment, please provide PST file for investigation.


#3

I guess there is a size limit to your upload. I an unable to use your upload tool.

Here is the same file on my share: https://drive.google.com/drive/folders/1VzGRGX_EFqYs1NFKepNlVDI9BVh0hJl8


#4

@GregoryJanco

We were able to reproduce this issue and have logged it with ID “EMAILNET-39146” for further investigation. You will automatically be informed here once we have more information to share.


#5

The issues you have found earlier (filed as EMAILNET-39146) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan


#6

I am trying to split pst using aspose.email in java.
pst.splitInto(1000000 , dataDir + “c1.pst”);

it throws and exception :Exception in thread “main” com.aspose.email.system.exceptions.FileNotFoundException: File not found File: C:\Users\DELL\Desktop\C:\Users\DELL\Desktop\c1.pst\Personal folders_part0.pst
File name: ‘C:\Users\DELL\Desktop\C:\Users\DELL\Desktop\c1.pst\Personal folders_part0.pst’ —> C:\Users\DELL\Desktop\C:\Users\DELL\Desktop\c1.pst\Personal folders_part0.pst (The filename, directory name, or volume label syntax is incorrect)
com.aspose.email.internal.ev.d.(Unknown Source)
com.aspose.email.internal.ev.d.(Unknown Source)
com.aspose.email.internal.ev.d.(Unknown Source)
com.aspose.email.system.io.FileStream.(Unknown Source)
com.aspose.email.system.io.FileStream.(Unknown Source)
com.aspose.email.PersonalStorage.create(SourceFile:324)
com.aspose.email.PersonalStorage.a(SourceFile:1463)
com.aspose.email.gz.b(SourceFile:75)
com.aspose.email.PersonalStorage.splitInto(SourceFile:1143)

File Attached : https://drive.google.com/open?id=1JXC9Hi1GP1hwV7DoyHGDfilgiHN79RJB


#7

@praw,

I have observed following stack trace information on my end.

It seems if you are not providing correct path for .PST file in your application. Can you please verify this again on your end and share a working sample project reproducing the issue with us as from above code the dataDir is not defined.