swing - Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError -
i trying read .docx
file jtextpane
, giving exception. using poi library. should do? me out, please. here code:
file = new file( "c:\\users\\siddique ansari\\documents\\cv parser\\siddique_resume.docx"); fileinputstream fis=new fileinputstream(file.getabsolutepath()); xwpfdocument document=new xwpfdocument(fis);// line no 549 extractor = new xwpfwordextractor(document); string filedata = extractor.gettext(); document doc = jtextpane1.getdocument(); system.out.println(filedata); doc.insertstring(doc.getlength(), filedata, null);
and exception
:
exception in thread "awt-eventqueue-0" java.lang.noclassdeffounderror: org/apache/xmlbeans/xmlexception @ cvparser.excelsheet.jbutton3actionperformed(excelsheet.java:549) @ cvparser.excelsheet.access$400(excelsheet.java:39) @ cvparser.excelsheet$5.actionperformed(excelsheet.java:219) @ javax.swing.abstractbutton.fireactionperformed(abstractbutton.java:1995) @ javax.swing.abstractbutton$handler.actionperformed(abstractbutton.java:2318) @ javax.swing.defaultbuttonmodel.fireactionperformed(defaultbuttonmodel.java:387) @ javax.swing.defaultbuttonmodel.setpressed(defaultbuttonmodel.java:242) @ javax.swing.plaf.basic.basicbuttonlistener.mousereleased(basicbuttonlistener.java:236) @ java.awt.component.processmouseevent(component.java:6263) @ javax.swing.jcomponent.processmouseevent(jcomponent.java:3267) @ java.awt.component.processevent(component.java:6028) @ java.awt.container.processevent(container.java:2041) @ java.awt.component.dispatcheventimpl(component.java:4630) @ java.awt.container.dispatcheventimpl(container.java:2099) @ java.awt.component.dispatchevent(component.java:4460) @ java.awt.lightweightdispatcher.retargetmouseevent(container.java:4574) @ java.awt.lightweightdispatcher.processmouseevent(container.java:4238) @ java.awt.lightweightdispatcher.dispatchevent(container.java:4168) @ java.awt.container.dispatcheventimpl(container.java:2085) @ java.awt.window.dispatcheventimpl(window.java:2475) @ java.awt.component.dispatchevent(component.java:4460) @ java.awt.eventqueue.dispatchevent(eventqueue.java:599) @ java.awt.eventdispatchthread.pumponeeventforfilters(eventdispatchthread.java:269) @ java.awt.eventdispatchthread.pumpeventsforfilter(eventdispatchthread.java:184) @ java.awt.eventdispatchthread.pumpeventsforhierarchy(eventdispatchthread.java:174) @ java.awt.eventdispatchthread.pumpevents(eventdispatchthread.java:169) @ java.awt.eventdispatchthread.pumpevents(eventdispatchthread.java:161) @ java.awt.eventdispatchthread.run(eventdispatchthread.java:122) caused by: java.lang.classnotfoundexception: org.apache.xmlbeans.xmlexception @ java.net.urlclassloader$1.run(urlclassloader.java:200) @ java.security.accesscontroller.doprivileged(native method) @ java.net.urlclassloader.findclass(urlclassloader.java:188) @ java.lang.classloader.loadclass(classloader.java:307) @ sun.misc.launcher$appclassloader.loadclass(launcher.java:301) @ java.lang.classloader.loadclass(classloader.java:252) @ java.lang.classloader.loadclassinternal(classloader.java:320) ... 28 more
in addition apache-poi jar files, example,
1869113 11-26-12 17:22 poi-3.9/poi-3.9-20121203.jar 936648 11-26-12 17:22 poi-3.9/poi-ooxml-3.9-20121203.jar 4802621 11-26-12 17:22 poi-3.9/poi-ooxml-schemas-3.9-20121203.jar
you'll need jar files ooxml-lib
in classpath
:
313898 04-05-09 14:28 poi-3.9/ooxml-lib/dom4j-1.6.1.jar 26514 02-23-11 12:31 poi-3.9/ooxml-lib/stax-api-1.0.1.jar 2666695 04-05-09 14:29 poi-3.9/ooxml-lib/xmlbeans-2.3.0.jar
Comments
Post a Comment