You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Peter Herchl <pe...@gmail.com> on 2007/12/13 13:57:42 UTC

ChunkNotFoundException

Hello,
I tried to write a simple class to read a subject from outlook .msg
file. I got this exception:


org.apache.poi.hsmf.exceptions.ChunkNotFoundException:
__substg1.0_0037001E was named, but not found in POIFS object
        at org.apache.poi.hsmf.parsers.POIFSChunkParser.getDocumentNode(POIFSChunkParser.java:121)
        at org.apache.poi.hsmf.parsers.POIFSChunkParser.getDocumentNode(POIFSChunkParser.java:137)
        at org.apache.poi.hsmf.MAPIMessage.getStringFromChunk(MAPIMessage.java:68)
        at org.apache.poi.hsmf.MAPIMessage.getSubject(MAPIMessage.java:90)
        at SimpleMSGTitleReader.main(SimpleMSGTitleReader.java:13)
Exception in thread "main"

source:

public class SimpleMSGTitleReader {

        public static void main(String[] args)
                throws IOException, ChunkNotFoundException
        {
                MAPIMessage msg = new MAPIMessage("aa.msg");
                System.out.println("Subject: "+msg.getSubject());
        }
}

What's wrong with it? How can i solve this issue?

Thanks

Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Re: ChunkNotFoundException

Posted by Nick Burch <ni...@torchbox.com>.
On Thu, 13 Dec 2007, Peter Herchl wrote:
> I tried to write a simple class to read a subject from outlook .msg 
> file. I got this exception:
>
> org.apache.poi.hsmf.exceptions.ChunkNotFoundException:
> __substg1.0_0037001E was named, but not found in POIFS object

Looks like we're assuming that all chunks a message names will be there, 
but it looks like they aren't always.

Can you upload the problem .msg file to bugzilla? Travis (who contributed 
the outlook code) will then be able to take a look, and see if any of his 
assumptions need to be altered.

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org