Closed GoogleCodeExporter closed 9 years ago
This sounds like it is related to the work I've been trying to sort out in
relation to the Descriptor items.
Are you working from SVN? if so, try the code from the 0.5 release.
Original comment by rjohnson...@gmail.com
on 21 Feb 2011 at 9:55
[deleted comment]
[deleted comment]
Today I've got last release of pff 0.5.
After that I uncomment "PSTFolder.getEmailCount()" method and insert its call
to your "Test.java" sample. (Thanks for it. It's very useful.)
The application fails with java.lang.NullPointerException.
To find what happens I uncomment line 131 in "PSTFolder.initEmailsTable()":
System.out.println("Can't get children for folder
"+this.getDisplayName()+"("+this.getDescriptorNodeId()+") child count:
"+this.getContentCount()+ " - "+err.toString());
and get the following output:
================================================
java Test cara_semperger_000.pst
cara_semperger_000
|- SPAM Search Folder 2
Can't get children for folder SPAM Search Folder 2(8739) child count: 0 - com.pf
f.PSTException: Unable to find 8751
================================================
I know that I can count e-mails in folders one-by-one in while() cycle, but is
it possible to return calculation of its number to the PST API?
Regards,
Maxim
Original comment by justpdat...@gmail.com
on 22 Feb 2011 at 11:16
The way you are meant to get the number of emails in a folder is to use
PSTFolder.getContentCount()
I see what the problem is now you have added that debugging message. You are
trying to get the children of a folder that doesn't have any! The SPAM Search
Folder is a special type of index folder with no direct children, we are unsure
how to deal with Search folders.
Most folders have an associated content table at NodeId+12, which lists the
child emails and this is missing for the SPAM search folder.
Was there a reason you wanted to use the deprecated and commented out
getEmailCount instead of the getContentCount? I understand the comment for the
function is a little misleading, but it was written at the very beginning of
the project when we weren't quite sure how the whole thing worked.
I'm closing this issue for now, but please let me know if there is an issue
with getContentCount.
Original comment by rjohnson...@gmail.com
on 22 Feb 2011 at 11:28
When I didn't change code I have no exceptions with "SPAM Search Folder", but
have one with another search folder. I use "Test.java" sample.
>java Test cara_semperger_000.pst
The output is:
cara_semperger_000
|- SPAM Search Folder 2
|- Top of Personal Folders
| |- Deleted Items
| |- Inbox
| |- Outbox
| |- Sent Items
.....
The bottom of the output:
|- Search Root
| |- ??? ?????????
Can't get children for folder ??? ?????????(1827) child count: 1264 -
com.pff.PSTException: Unable to find 1839
|- IPM_VIEWS
|- IPM_COMMON_VIEWS
Regards,
Maxim
Original comment by justpdat...@gmail.com
on 10 Mar 2011 at 7:45
Original issue reported on code.google.com by
justpdat...@gmail.com
on 21 Feb 2011 at 9:37