You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by shishir patil <sh...@yahoo.com> on 2007/06/13 16:37:03 UTC

Getting error while reading Powerpoint file.

Hi,
   
  I am getting following exception (Invalid header signature) while reading Powerpoint object (Stored as an OLE object) from database. I am using POI 3.0. 
   
  Exception:
  java.io.IOException: Invalid header signature; read 8593284117, expected -2226271756974174256
   
  My code snippet is as below:
  InputStream is = rs.getBinaryStream("Presentation");
  HSLFSlideShow hss = new HSLFSlideShow(is); //Exception thrown
   
  When googled, I found couple of mail-archives with this error, but in most of them, the file format was a problem. My ppt presentation seems fine to me as I can open it directly from database and view all slides. 
   
  Any pointer would be appreciated.
   
  thanks,
  Shishir

       
---------------------------------
Boardwalk for $500? In 2007? Ha! 
Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.

Re: Getting error while reading Powerpoint file.

Posted by shishir patil <sh...@yahoo.com>.
Thanks much for the reply. 
  I streamed out the data and stored in a sample ppt file, unfortunately powerpoint could not open it. I searched further on the net and now think that, this is happening becuase we are using jdbc-odbc bridge to retrieve data, (oracle driver is not yet installed for our oracle db) which does not support reading such binary stream, or blob from database. 
   
  thanks again.
  shishir

Nick Burch <ni...@torchbox.com> wrote:
  On Wed, 13 Jun 2007, shishir patil wrote:
> When googled, I found couple of mail-archives with this error, but in 
> most of them, the file format was a problem. My ppt presentation seems 
> fine to me as I can open it directly from database and view all slides.

I can only suggest streaming the data out of the database and onto disk, 
and checking from there (both HSLF and PowerPoint)

It's possible that the database ole storage is actually missing of part of 
the ole2 metadata. The exception you got is triggered by POIFS failing to 
find a correct ole2 stream

Nick

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



       
---------------------------------
You snooze, you lose. Get messages ASAP with AutoCheck
 in the all-new Yahoo! Mail Beta. 

Re: Getting error while reading Powerpoint file.

Posted by Nick Burch <ni...@torchbox.com>.
On Wed, 13 Jun 2007, shishir patil wrote:
>  When googled, I found couple of mail-archives with this error, but in 
> most of them, the file format was a problem. My ppt presentation seems 
> fine to me as I can open it directly from database and view all slides.

I can only suggest streaming the data out of the database and onto disk, 
and checking from there (both HSLF and PowerPoint)

It's possible that the database ole storage is actually missing of part of 
the ole2 metadata. The exception you got is triggered by POIFS failing to 
find a correct ole2 stream

Nick

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