louismullie / stanford-core-nlp

Ruby bindings to the Stanford Core NLP tools (English, French, German).
Other
432 stars 70 forks source link

java.lang.ClassNotFoundException: AnnotationBridge #48

Open aherriau opened 7 years ago

aherriau commented 7 years ago

Hi,

I want to use the stanford-core-nlp gem in a rails application. So, I followed the README file instructions :

But when i want to use the gem and write in a rails controller file : pipeline = StanfordCoreNLP.load(:pos)

I have this error : java.lang.ClassNotFoundException: AnnotationBridge

But I can see the AnnotationBridge.java file in the bin/ folder of the gem ... I don't know how or where I can specify the path ... Any help ?

Thank you !

tayeb83 commented 6 years ago

Hi, Probably the AnnotationBridge.java and .class are not found.

guitassinari commented 3 years ago

I'm having the same problem here. @aherriau Were you able to solve this?

guitassinari commented 3 years ago

Just in case someone faces the same problem:

My case was that I downloaded the bridge.jar from GitHub using wget as I was creating a Dockerfile to create the whole Stanford CoreNLP environment for my application.

The problem is that the wget was actually downloading GitHub's HTML page as bridge.jar. Without bridge.jar BindIt/RJB couldn't load AnnotationBridge, obviously.

The solution was downloading bridge.jar manually and altering my Dockerfile accordingly.

Hope it helps someone.