eclipse - Exception in thread "main" java.lang.NoClassDefFoundError: org/pdfbox/util/PDFTextStripper -
i trying resolve issue.
steps taken resolve issue:
1): have downloaded frontbox-1.2.1.jar , pdfbox-1.2.1.jar , went eclipse->build path-> libraries , added jar file.
this error:
exception in thread "main" java.lang.noclassdeffounderror: org/pdfbox/util/pdftextstripper @ java.lang.class.getdeclaredmethods0(native method) @ java.lang.class.privategetdeclaredmethods(unknown source) @ java.lang.class.getdeclaredmethods(unknown source) @ gate.creole.creoleannotationhandler.processparameters(creoleannotationhandler.java:365) @ gate.creole.creoleannotationhandler.processannotationsforresource(creoleannotationhandler.java:225) @ gate.creole.creoleannotationhandler.processannotations(creoleannotationhandler.java:169) @ gate.creole.creoleannotationhandler.processannotations(creoleannotationhandler.java:173) @ gate.creole.creoleannotationhandler.processannotations(creoleannotationhandler.java:173) @ gate.creole.creoleannotationhandler.processannotations(creoleannotationhandler.java:157) @ gate.creole.creoleregisterimpl.parsedirectory(creoleregisterimpl.java:318) @ gate.creole.creoleregisterimpl.registerbuiltins(creoleregisterimpl.java:358) @ gate.gate.initcreoleregister(gate.java:477) @ gate.gate.init(gate.java:221) @ yelpservlet.yelpgate.<init>(yelpgate.java:47) @ yelpservlet.yelpgate.getinstance(yelpgate.java:75) @ yelpservlet.yelpgate.main(yelpgate.java:328) caused by: java.lang.classnotfoundexception: org.pdfbox.util.pdftextstripper @ java.net.urlclassloader$1.run(unknown source) @ java.net.urlclassloader$1.run(unknown source) @ java.security.accesscontroller.doprivileged(native method) @ java.net.urlclassloader.findclass(unknown source) @ java.lang.classloader.loadclass(unknown source) @ sun.misc.launcher$appclassloader.loadclass(unknown source) @ java.lang.classloader.loadclass(unknown source) ... 16 more
java code
public class yelpgate { // remember create log4j.properties file under project dir!!! string homedir = "c:/program files/gate_developer_7.1/"; string ruledir = "c:/users/rupesh/workspace/yelpmongo/yelp/yelp.xgapp"; // used corpus control private static gate.corpuscontroller ctrl; // singleton private static yelpgate instance = null; /* * constructor of yelpgate, load gate plugins when initializaion */ private yelpgate() { system.out.println("start initialization..."); try { if (gate.getgatehome() == null) { gate.setgatehome(new file(homedir)); } gate.init(); gate.getcreoleregister().registerdirectories( new file(homedir + "plugins", "annie").touri().tourl()); //for if using plugin gate.getcreoleregister().registerdirectories( new file(homedir + "plugins", "tools").touri().tourl()); ctrl = ((gate.corpuscontroller) loadobjectfromfile(new java.io.file(ruledir))); } catch (exception e){ system.out.println(e.getmessage()); } } // end of: private yelpgate() /* * instance of yelpgate, create 1 when first called */ public static yelpgate getinstance() { if (instance == null) { synchronized (yelpgate.class) { if (instance == null) { instance = new yelpgate(); } } } return instance; } // end of: public static yelpgate getinstance()
please me identify , solve issue.
Comments
Post a Comment