• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 42
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
reply
    Bookmark Topic Watch Topic
  • New Topic