aspose file tools*
The moose likes Other Open Source Projects and the fly likes Your InputStream was neither an OLE2 stream, nor an OOXML stream Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Your InputStream was neither an OLE2 stream, nor an OOXML stream" Watch "Your InputStream was neither an OLE2 stream, nor an OOXML stream" New topic
Author

Your InputStream was neither an OLE2 stream, nor an OOXML stream

Manjesh Patil
Ranch Hand

Joined: Sep 24, 2010
Posts: 41

Hi,
I am using Apache Commons libraries to upload a .docx file . I want to extract the text using Apache POI at the same time. My application server(Google App egine) does not allow to create files so I cannot write to file. This is the reason I need to extract the text from uploaded file and store it as String object or BLOB in database.

While doing so I cannot pass the inputStream returned by ServletFileUpload to Apache POI API, it is throwing an exception Your InputStream was neither an OLE2 stream, nor an OOXML stream
the POI API expects a FileInputStream but the inputStream returned by ServletFileUpload is not compatible ..


I am passing a valid .docx file.
how should I handle this?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Your InputStream was neither an OLE2 stream, nor an OOXML stream