hotpxl / corenlp-server

Server wrapper for Stanford CoreNLP
MIT License
8 stars 0 forks source link

`Could not find class edu.stanford.nlp.pipeline.StanfordCoreNLP` error #1

Closed jimkang closed 8 years ago

jimkang commented 8 years ago

After I build and run the image (with the -itp switch), when I go to the corenlp-server directory and try to start the server, I get this error.

root@eeebd23ea63e:/corenlp-server# ./start-server.sh 

> @ start /corenlp-server
> node index.js

CoreNLP Server listening at http://[::]:8080
Unhandled rejection Error: Could not find class edu.stanford.nlp.pipeline.StanfordCoreNLP
java.lang.NoClassDefFoundError: edu/stanford/nlp/pipeline/StanfordCoreNLP
Caused by: java.lang.ClassNotFoundException: edu.stanford.nlp.pipeline.StanfordCoreNLP
  at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

    at Error (native)
    at Java.tryCatcher (/corenlp-server/node_modules/bluebird/js/release/util.js:16:23)
    at Java.ret [as newInstanceAsync] (eval at <anonymous> (/corenlp-server/node_modules/bluebird/js/release/promisify.js:184:12), <anonymous>:15:23)
    at /corenlp-server/lib.js:23:17
    at tryCatcher (/corenlp-server/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/corenlp-server/node_modules/bluebird/js/release/promise.js:503:31)
    at Promise._settlePromise (/corenlp-server/node_modules/bluebird/js/release/promise.js:560:18)
    at Promise._settlePromise0 (/corenlp-server/node_modules/bluebird/js/release/promise.js:605:10)
    at Promise._settlePromises (/corenlp-server/node_modules/bluebird/js/release/promise.js:684:18)
    at Promise._fulfill (/corenlp-server/node_modules/bluebird/js/release/promise.js:629:18)
    at /corenlp-server/node_modules/bluebird/js/release/nodeback.js:42:21

Any ideas as to how I can find that class and debug this?

jimkang commented 8 years ago

Oh, it seems I missed the "Stanford CoreNLP is also needed. Install separately and make a symbolic link java-lib to it" step and went straight to the "nothing else is needed step."