Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Apache POI 2007 word documents

 
Leo Max
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Pie
Posts: 20945
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That would be because you didn't include the XML Beans jar in your classpath.
 
Leo Max
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic