java-libpst
java-libpst copied to clipboard
PSTException: Can't get child folders [...] getNodeInfo: node index doesn't exist!
I've built java-libpst master as per 8-Nov-2016. When running the example/TestGui against my large E-Mail archive, I'm getting this error:
com.pff.PSTException: Can't get child folders for folder Arch-Hipri(32930) child count: 5 - com.pff.PSTException: getNodeInfo: node index doesn't exist! nid = 0x000001A0
at com.pff.PSTFolder.getSubFolders(PSTFolder.java:103)
at example.TestGui.buildTree(TestGui.java:354)
at example.TestGui.buildTree(TestGui.java:355)
at example.TestGui.buildTree(TestGui.java:355)
at example.TestGui.
I'm happy to help troubleshooting / coding if you can give any pointers where to start ...
ouch, hmm, first steps would be to run ScanPST over it, make sure nothing else is accessing the file, etc.
next would be to try and dig into the subfolders table and each of the items therein. The value 26610 is somewhat magic, it may be different for reasons, it would be good to see the magic folder nid we are after is sitting in the items under a different index (most of the PST objects give useful debug information if you .toString them...)
Thanks for the quick response !
- Where do I find ScanPST ?
- I am 100% sure nothing else accesses this archive_2015 mail archive
- I am afraid your hints about nid are a little bit too cryptic for me right now as I am just starting :) but I can easily iterate and .toString() if it helps.
Another hint, probably relevant -- Running against my archive_2016 mail archive I'm getting this (I've already added a little bit debug info):
com.pff.PSTException: Can't get child folders for folder eclipse-bugs(34178) child count: 949, read so far:[] - com.pff.PSTException: getNodeInfo: node index doesn't exist! nid = 0x000002E0
Double checking in Outlook, my "eclipse-bugs" folder is 2 levels deep in the hierarchy, and has exactly one subfolder (which in turn has other subfolders). I might have deleted other subfolders in the past, maybe the PST has some dangling references to what is supposed to be deleted ?

Screenshot attached - the screenshot is from Outlook for Mac, the archive is from Outlook 2010 for Windows but uses the same folder structure. As you probably guess by now, I'll need java-libpst for accessing my Windows archives as I'm migrating to Mac... Could I perhaps ignore these kind of errors and move on, just to get access to as much "working" contents of my archive as possible quickly ?
yeah, PST definitely is prone to old pointers and whatnot confusing things, and the library isn't the best at knowing where outlook finds things in the convoluted structure.
Given you've had it on a couple of files I'm happy to believe that there's a bug with nested folders. It would be amazing if you were able to provide me with a subset of the file / have a go at creating one that exhibits the error so I can go digging (creating/obtaining PSTs is difficult for me).
You should be able to catch the exception and skip over the folder if you are happy to miss the folder contents.
This might also be handy if you fancy a hack: https://github.com/rjohnsondev/java-libpst/blob/develop/src/main/java/com/pff/PSTFile.java#L843
It should create a tree of all PST items sourced from a different structure, with the format:
ParentDescriptorIndex: [children DescriptorIndexNode]
Each DescriptorIndexNode
has a .descriptorIdentifier
property, AKA the descriptorIndex
that can be fed into
PSTObject.detectAndLoadPSTObject()
to get the emails, folders, etc.
I believe the top-level items should have a 0 parent...
Ok, thanks, that helps a lot !
I also found ScanPST.exe via KB272227 , had it run on my original archive_2015 and it found lots of errors: archive_2015.log.txt -- interesting that Outlook 2010 itself never complained so far.
Would you like to pursue any "alternative structure / repair" options in Java on the original file, or should I have ScanPST.exe repair it first ?
Yeah, outlook is actually pretty tolerant of corruption.
I'd be keen to see if the problems persist after repair, while I'd like to explore ways to make the library more tolerant to some types of corruption it's a hard problem and ScanPST already provides a pretty accessible solution.
Let me know how you go.
Hi, I've decided to run Scanpst on all my archives and keep the backups. There were errors reported in all archives. Size increased by 0.7% on average due to scanpst.
After doing so, java-libpst TestGUI reports the "Can't get child folders ... for search folder", which I reported in issue #50, on all of them. But this doesn't seem to be critical for applications. Docfetcher can get and index all the contents it seems (using java-libpst version 0.8.1). So for now I have what I need : My archives won't change any more, so having run scanpst once was an acceptable solution. I've tested 5 years of 1.5GB to 2.4GB archives each, so I guess the sample is decent.
Just for the records, I went the extra mile and ran scanpst a 2nd time on the repaired archives. In each case, it reported one additional error ("!!AMap page @xxxx has csFree of xx, but should have 255"). This was fixed by the 2nd scanpst run on each archive and doesn't seem relevant for java-libpst.
I would suggest adding a reference to scanpst (that it exists, and where to find it) to the Readme.MD and then close this issue. Pursuing issue #50 would be cool, though it doesn't look like a blocker.
Thanks for all your help so far, let me know if there's anything else I can help with ! Martin