This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Apache POI 2007 word documents" Watch "Apache POI 2007 word documents" New topic
Author

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
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

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 http://xmlbeans.apache.org/sourceAndBinaries/ 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:
dom4j-1.6.1.jar
xmlbeans-2.3.0.jar
poi-3.8-beta3-20110606.jar
poi-ooxml-3.83-20110606.jar
poi-ooxml-schemas-3.8-beta3-20110606.jar

i got these jar files from http://www.apache.org/dyn/closer.cgi/poi/dev/src/poi-src-3.8-beta3-20110606.zip just extract the contents to a folder
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Apache POI 2007 word documents
 
Similar Threads
InvalidFormatException
Convert .doc file to .txt file
Replace table column value in Apache POI
file is empty, will fail
Junk value when converting .doc t .txt file