File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other Open Source Projects and the fly likes Apache POI 2007 word documents Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Apache POI 2007 word documents" Watch "Apache POI 2007 word documents" New topic

Apache POI 2007 word documents

Leo Max
Ranch Hand

Joined: Sep 27, 2009
Posts: 36
My app takes in the location of hte .docx document and prints the first 3 lines. I'm getting an error at the line i marked xxx. The exception is: Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/apache/xmlbeans/XmlException

any ideas?

Thank you.
Paul Clapham

Joined: Oct 14, 2005
Posts: 18120

That would be because you didn't include the XML Beans jar in your classpath.
Leo Max
Ranch Hand

Joined: Sep 27, 2009
Posts: 36
Hello. Ya I found out when I googled the error I got. I'm trying to find the jar file but with no luck. I downloaded xmlbeans from but there was no jar extension. i downloaded it and extracted the contents but couldn't find a file called xmlbeans or xbeans or xmlbeans 2.4.0. I'm trying to find it online but no luck.
Now i'll apologize for asking the following but when you say class path, where exactly are you point to?
Leo Max
Ranch Hand

Joined: Sep 27, 2009
Posts: 36
i would like to read the contents of an ms word 2007 document. does anyone have a code that i can read for this? I found the jar file online. finally. even tho i dont get an exception anymore, it's still not printing anything. so i wrote a fewy sys.print lines to find out where exactly am i gettin gstuck at and it's the same prb. for some reason, that line /****/ simply wont execute -_-
Leo Max
Ranch Hand

Joined: Sep 27, 2009
Posts: 36
Fixed it. I hope this code helps whoever's in need

the list of jar files you need to add when setting the classpath are:

i got these jar files from just extract the contents to a folder
I agree. Here's the link:
subject: Apache POI 2007 word documents
Similar Threads
Junk value when converting .doc t .txt file
file is empty, will fail
Replace table column value in Apache POI
Convert .doc file to .txt file