Pregunta

I am trying to read a word file and then store it in my database. for that I am using APACHI POI

http://sanjaal.com/java/tag/java-and-docx-format/

I have add the required jars in my build path, there is no import error

But When I run/Complile my application it says :

            [ERROR] Line 22: No source code is available for type org.apache.poi.poifs.filesystem.POIFSFileSystem; did you forget to inherit a required module?
  [ERROR] Line 24: No source code is available for type java.io.FileInputStream; did you forget to inherit a required module?
  [ERROR] Line 25: No source code is available for type org.apache.poi.hwpf.HWPFDocument; did you forget to inherit a required module?
  [ERROR] Line 47: No source code is available for type org.apache.poi.hwpf.extractor.WordExtractor; did you forget to inherit a required module?
  [ERROR] Line 63: No source code is available for type org.apache.poi.hwpf.usermodel.HeaderStories; did you forget to inherit a required module?
  [ERROR] Line 77: No source code is available for type org.apache.poi.hpsf.DocumentSummaryInformation; did you forget to inherit a required module?

Any Idea What I have missed

Thanks

¿Fue útil?

Solución 2

I think these jars are not appropriate for GWT client side. Because of that you can use them only in your server side, not in your client side.

Otros consejos

GWT is not a complete JVM - it's a source preprocessor with a subset of the Java runtime enviroment, hence you cannot willy-nilly usse any JAR you find with it. You will need to do all the processing and text extraction on the server side.

I guess that you used the libary in the client side of your GWT application. In this part of your programm you can only use Java classes which can be compiled to JavaScript. And the GWT can only compile a limited number of Java classes. And besides it's not possible afaik to open a file in JavaScript ( which is used in the Client). Do the file I/O in the server part of your application and transfer the content via RPC or with the requestfactory.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top