Closed wmkouw closed 6 years ago
Line 159 in ixa-heideltime/src/main/java/ixa/pipe/time/IXAPipeHeidelTime.java contains:
heidelTime.initialize(new UimaContextImpl(language, typeToProcess))
This should be changed into
heidelTime.initialize(new UimaContextImpl(language, typeToProcess, doIntervalTagging))
The compilation error is caused by the missing argument doIntervalTagging
.
Compiling unaltered files with maven-compiler-plugin 2.4 (changed in pom.xml; source=1.8, target=1.8) throws "cannot be applied to given types" error:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.512 s
[INFO] Finished at: 2018-03-29T08:19:22+02:00
[INFO] Final Memory: 19M/205M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.4:compile (default-compile) on project time: Compilation failure
[ERROR] /home/$UNAME/ixa-heideltime/src/main/java/ixa/pipe/time/IXAPipeHeidelTime.java:[159,25] error: constructor UimaContextImpl in class UimaContextImpl cannot be applied to given types;
[ERROR]
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.4:compile (default-compile) on project time: Compilation failure
/home/$UNAME/ixa-heideltime/src/main/java/ixa/pipe/time/IXAPipeHeidelTime.java:[159,25] error: constructor UimaContextImpl in class UimaContextImpl cannot be applied to given types;
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:993)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:345)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:191)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation failure
/home/$UNAME/ixa-heideltime/src/main/java/ixa/pipe/time/IXAPipeHeidelTime.java:[159,25] error: constructor UimaContextImpl in class UimaContextImpl cannot be applied to given types;
at org.apache.maven.plugin.AbstractCompilerMojo.execute (AbstractCompilerMojo.java:678)
at org.apache.maven.plugin.CompilerMojo.execute (CompilerMojo.java:128)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:993)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:345)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:191)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
UimaContextImpl third argument is not the private Boolean doIntervalTagging
, but the Boolean debug
(https://www.programcreek.com/java-api-examples/index.php?source_dir=heideltime-master/src/de/unihd/dbs/heideltime/standalone/components/impl/JCasFactoryImpl.java#)
@antske reports that these compilation errors do not occur on macOS (2 systems checked).
I have tried compiling it with openjdk-8, oracle-java-8 and the JDK-10. Same error each time.
Plugging in false
for debug
in line 159 of IXAPipeHeidelTime.java leads to jCas factory initialization errors -> #17.
But there might be a workaround there.
The problem occurs because I had a source version of heideltime installed in my local maven repository (~/.m2/repository
). During compilation, maven imported the UimaContextImpl class from the source version, instead of the local dependency set by install-to-project-repo.py
:
<repository>
<id>heideltime-local-dependency-repo</id>
<url>file://${basedir}/repo</url>
</repository>
It threw its error because no argument was given for debug
.
Initially, I did not have a folder named unihd
in ~/.m2/repository/de/
and I therefore concluded that I did not have a local installation of heideltime.
However, removing ~/.m2/
entirely and letting maven download everything again, made sure that the compilation succeeded.
Goal: Compile NAF wrapper for Heideltime module.
Input: Completed instructions on repo and started
mvn clean install
. ixa-heideltime is on commit 9656616 and heideltime-standalone jar is on version 2.2.1Problem: Compilation error involving UimaContextImpl
Stack trace: