dice-group / gerbil

GERBIL - General Entity annotatoR Benchmark
GNU Affero General Public License v3.0
222 stars 58 forks source link

Benchmarking dev versions of annotation datasets and build error #146

Closed tgalery closed 8 years ago

tgalery commented 8 years ago

Hi @RicardoUsbeck thanks for awesome work with gerbil. I'm trying to run it against a experimental branch of spotlight and I have a few questions.

First, when I run ./start.sh, I'm getting the following error.

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project gerbil: Fatal error compiling: invalid target release: 1.8 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Running it on OSX 10.11 (tomcat 8 is aliased as service tomcat and tomcat 7 as service tomcat7). Any pointers ?

More specifically to my question. I want to compare spotlight master branch against a feature one. I'd run both from my localhost. So the only thing I need to do is change the url to localhost in the gerbil.properties file and it should be all gravy, right ?

RicardoUsbeck commented 8 years ago

Dear tgalery, thanks for using GERBIL.

1) Could you please tell us your java and maven version? 2) Changing it in the gerbil.properties file should be sufficient.

Cheers, Ricardo

MichaelRoeder commented 8 years ago

Hi,

  1. I agree with @RicardoUsbeck that the error message looks like you don't have java 1.8 installed (at least the maven compiler plugin couldn't find it).
  2. If I understood your second question correctly, you would like to benchmark two versions of spotlight that are running locally. If both are using the same API as the "original" spotlight, you can add the following lines to the annotators.properties file (and replace http://localhost:2222/rest/ with the correct URLs) to define the two local spotlight services:
org.aksw.gerbil.annotators.definition.spotlight2.name=DBpedia Spotlight local
org.aksw.gerbil.annotators.definition.spotlight2.experimentType=OKE_Task1
org.aksw.gerbil.annotators.definition.spotlight2.cacheable=false
org.aksw.gerbil.annotators.definition.spotlight2.class=org.aksw.gerbil.annotator.impl.spotlight.SpotlightAnnotator
org.aksw.gerbil.annotators.definition.spotlight2.constructorArgs=http://localhost:2222/rest/

org.aksw.gerbil.annotators.definition.spotlight3.name=DBpedia Spotlight new
org.aksw.gerbil.annotators.definition.spotlight3.experimentType=OKE_Task1
org.aksw.gerbil.annotators.definition.spotlight3.cacheable=false
org.aksw.gerbil.annotators.definition.spotlight3.class=org.aksw.gerbil.annotator.impl.spotlight.SpotlightAnnotator
org.aksw.gerbil.annotators.definition.spotlight3.constructorArgs=http://localhost:2223/rest/

Cheers, Michael

tgalery commented 8 years ago

Cheers, yeah it turned out I had set java 8 through jenv. I guess when the start script was run maybe things got executed in a subshell where that information was lost.

Now, when I go to http://localhost:1234/gerbil I get this:

org.apache.jasper.JasperException: Unable to compile class for JSP: 

An error occurred at line: 1 in the generated java file
The type java.io.ObjectInputStream cannot be resolved. It is indirectly referenced from required .class files

Stacktrace:
    org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
    org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
    org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:439)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:349)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:327)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:314)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:238)
    org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:264)
    org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1216)
    org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1001)
    org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:945)
    org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:867)
    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:951)
    org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:842)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:827)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

On the banchmarking front, I was wondering how the mappings between ids would are treated. In previous experiments with spotlight I found out that models created with newer wikidumps had a severe hit because the old ids that existed in certain datasets don't exist anymore. I know that you mitigate that fact by I'just would like to know how.

Thanks again.

MichaelRoeder commented 8 years ago

1) The error says that it was not able to find the definition of the java.io.ObjectInputStream class. Normally, this is caused by a problem with the class path, i.e., the program uses a class for which it can not find the definition. If it would be a different class, I would argue that it is a bug of the program, i.e., GERBIL. However, the class that can not be found is a part of the java core classes and they should be there. At least to me it looks strange that it is not able to find one of its "standard" classes. It might be caused by a misconfiguration of your Java installation which is missing one of the core libraries...

2) GERBIL searches for owl:sameAs links and makes use of the Wikipedia API to retrieve the "new" URIs for outdated URIs. It is described here. Unfortunately, this step takes a lot of time if GERBIL has not cached these links. Thus, you might want to start with a small dataset to check whether the benchmarking is working.

tgalery commented 8 years ago

Ok, at first I thought it would be more of a jenv issue messing up the jvm, but it seems to be something closer to this https://bugs.openjdk.java.net/browse/JDK-8155588 .

Was the package build with an earlier version of java 8 ?

Here is some info on my machine:

java -version
java version "1.8.0_102"
Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)
mvn -v
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T16:41:47+00:00)
Maven home: /usr/local/Cellar/maven/3.3.9/libexec
Java version: 1.8.0_102, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.11.6", arch: "x86_64", family: "mac"
MichaelRoeder commented 8 years ago

That would explain why we haven't encounted this problem before. Could you please open the start.sh file and replace the last line with

mvn clean org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:run -Dmaven.tomcat.port=1234

It will start Tomcat 7 instead of the "default" Tomcat version. Did it solve your problem?

tgalery commented 8 years ago

Yep, that fixed it. Want me to send a PR to the main codebase ?

MichaelRoeder commented 8 years ago

That would be great. Thanks.

tgalery commented 8 years ago

Submitted

MichaelRoeder commented 8 years ago

Thanks for your efforts!