nasa-jpl-memex / GeoParser

Extract and Visualize location from any file
Apache License 2.0
52 stars 23 forks source link

Docker: Could not find or load main class org.apache.tika.server.TikaServerCli #85

Closed cengel closed 4 years ago

cengel commented 7 years ago

Error: $ docker-compose up Starting docker_web_1 Attaching to docker_web_1 web_1 | Error: Could not find or load main class org.apache.tika.server.TikaServerCli docker_web_1 exited with code 1

Reason: Dockerfile (line 42) clones snapshot from tika github: RUN git clone https://github.com/apache/tika.git /home/Tika The current version is 1.15 (not 1.14)

Workaround: Edit the corresponding line (3) in docker-compose.yml: < command: bash -c "nohup lucene-geo-gazetteer -server & /home/Solr/solr-5.3.1/bin/solr start -p 8983 -h 127.0.0.1 && python /home/manage.py runserver 0.0.0.0:8000 & java -classpath /home/location-ner-model:/home/geotopic-mime:/home/Tika/tika-server/target/tika-server-1.14-SNAPSHOT.jar org.apache.tika.server.TikaServerCli -p 8001 -h 127.0.0.1"

> command: bash -c "nohup lucene-geo-gazetteer -server & /home/Solr/solr-5.3.1/bin/solr start -p 8983 -h 127.0.0.1 && python /home/manage.py runserver 0.0.0.0:8000 & java -classpath /home/location-ner-model:/home/geotopic-mime:/home/Tika/tika-server/target/tika-server-1.15-SNAPSHOT.jar org.apache.tika.server.TikaServerCli -p 8001 -h 127.0.0.1"

But perhaps a more permanent solution would be desirable that controls for the version.

smadha commented 7 years ago

Thanks a lot for reporting this @cengel !

I think we can add a line in DockerFile to move to tika 1.14 release and everything else should work as before.

RUN mkdir -p /home/Tika
RUN git clone https://github.com/apache/tika.git /home/Tika
WORKDIR /home/Tika
RUN git checkout tags/1.14-rc1
RUN mvn clean install -DskipTests
EXPOSE 9998

I added RUN git checkout tags/1.14-rc1

What do you think? Can you raise a PR?

smadha commented 7 years ago

We will also need to remove -SNAPSHOT from tika command as 1.14 is now a release version

/home/Tika/tika-server/target/tika-server-1.14.jar org.apache.tika.server.TikaServerCli -p 8001 -h 127.0.0.1
MBoustani commented 7 years ago

@smadha I think the idea you proposed might be a better solution to git clone Tika 1.14 branch.

chrismattmann commented 4 years ago

this is fixed in the latest Docker.