• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

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

 
Ranch Hand
Posts: 42
Java
  • Mark post as helpful
  • send pies
  • 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?
 
Surfs up space ponies, I'm making gravy without this lumpy, tiny ad:
Sauce Labs - World's Largest Continuous Testing Cloud for Websites and Mobile Apps
https://coderanch.com/t/722574/Sauce-Labs-World-Largest-Continuous
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!