brendano / stanford_corenlp_pywrapper

151 stars 59 forks source link

Error: Exception in thread "main" java.lang.NoClassDefFoundError #35

Closed yuliagrishina closed 6 years ago

yuliagrishina commented 8 years ago

I'm getting the following error:

Exception in thread "main" java.lang.NoClassDefFoundError: edu/stanford/nlp/pipeline/StanfordCoreNLP at corenlp.JsonPipeline.initializeCorenlpPipeline(JsonPipeline.java:206) at corenlp.SocketServer.main(SocketServer.java:102) 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) ... 2 more

I'm using MacOS 10.10.5 and I installed pywrapper via pip.

brendano commented 8 years ago

it's a problem setting up the classpath ...

yuliagrishina commented 8 years ago

I have no experience in Java, could you probably explain a bit what it means and how I can fix that?

Vimos commented 6 years ago
➜  stanford-corenlp cat /etc/profile.d/stanford-nlp.sh 
export STANFORD_NLP_HOME=/opt/stanford-nlp
export STANFORD_CORENLP_HOME=$STANFORD_NLP_HOME/stanford-corenlp
export STANFORD_PARSER_HOME=$STANFORD_NLP_HOME/stanford-parser
export STANFORD_POSTAGGER_HOME=$STANFORD_NLP_HOME/stanford-postagger
export STANFORD_MODELS=$STANFORD_POSTAGGER_HOME/models
export CLASSPATH=$STANFORD_CORENLP_HOME/stanford-corenlp-3.8.0.jar:$STANFORD_CORENLP_HOME/stanford-corenlp-3.8.0-models.jar:$STANFORD_POSTAGGER_HOME/stanford-postagger.jar:$CLASSPATH