elki-project / elki

ELKI Data Mining Toolkit
https://elki-project.github.io/
GNU Affero General Public License v3.0
780 stars 321 forks source link

Timeout on instantiating de.lmu.ifi.dbs.elki.gui.util.TreePopup #10

Closed lifepillar closed 8 years ago

lifepillar commented 8 years ago

I have tried to build v0.7.1 on OS X using Java 1.8.0_74 and Maven 3.3.9, and got the error in the subject. What does it depend on?

Here is the trace:

[DEBUG] Executing command line: [java, -cp, /Users/me/Downloads/elki-release0.7.1/elki/target/classes:/Users/me/.m2/repository/net/sf/trove4j/trove4j/3.0.3/trove4j-3.0.3.jar, de.lmu.ifi.dbs.elki.application.internal.DocumentParameters, /Users/me/Downloads/elki-release0.7.1/elki/target/apidocs/parameters-byclass.html, /Users/me/Downloads/elki-release0.7.1/elki/target/apidocs/parameters-byopt.html]
Timeout on instantiating de.lmu.ifi.dbs.elki.gui.util.TreePopup
java.util.concurrent.TimeoutException
java.lang.RuntimeException: java.util.concurrent.TimeoutException
    at de.lmu.ifi.dbs.elki.application.internal.DocumentParameters.buildParameterIndex(DocumentParameters.java:317)
    at de.lmu.ifi.dbs.elki.application.internal.DocumentParameters.main(DocumentParameters.java:149)
Caused by: java.util.concurrent.TimeoutException
    at java.util.concurrent.FutureTask.get(FutureTask.java:205)
    at de.lmu.ifi.dbs.elki.application.internal.DocumentParameters.buildParameterIndex(DocumentParameters.java:312)
    at de.lmu.ifi.dbs.elki.application.internal.DocumentParameters.main(DocumentParameters.java:149)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] ELKI Data Mining Framework - Parent Project ........ SUCCESS [  3.659 s]
[INFO] ELKI Data Mining Framework ......................... FAILURE [01:31 min]
[INFO] ELKI Data Mining Framework - Batik Visualization ... SKIPPED
[INFO] ELKI Data Mining Framework - Tutorial Algorithms ... SKIPPED
[INFO] ELKI Data Mining Framework - LibSVM based extensions SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:35 min
[INFO] Finished at: 2016-04-15T11:53:41+02:00
[INFO] Final Memory: 36M/682M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.3.2:exec (generate-javadoc-parameters) on project elki: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.3.2:exec (generate-javadoc-parameters) on project elki: Command execution failed.
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
    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:307)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
    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.MojoExecutionException: Command execution failed.
    at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:303)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
    ... 20 more
Caused by: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
    at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:402)
    at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:164)
    at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:746)
    at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:292)
    ... 22 more
[ERROR] 
[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
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :elki
kno10 commented 8 years ago

This may be an issue specific to OSX, unfortunately.

DocumentParameters tries to instantiate all classes in ELKI via the parameterization API to build a full parameter documentation. Specifically, it builds this documentation: http://elki.dbs.ifi.lmu.de/releases/release0.7.1/doc/parameters-byclass.html

Now TreePopup is little more than a Java Swing JPopupMenu. But for some reason this does take over 1 second on your computer? My only guess is that OSX does something weird because of its nonstandard UI.

You could try to increase the timeout in DocumentParameters.java from 1L, TimeUnit.SECONDS to maybe 10 seconds to give it more time.

If you don't need that part of the documentation, a workaround is to disable the exec task from pom.xml. Just search for DocumentParameters in the pom.xml files.

lifepillar commented 8 years ago

I've tried both your suggestions, and in either case I get other errors:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.10.1:jar (attach-javadocs) on project elki: MavenReportException: Error while creating archive:
[ERROR] Exit code: 1 - /Users/nicola/Downloads/elki-release0.7.1/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/AbstractAlgorithm.java:47: error: unknown tag: apiviz.landmark
[ERROR] * @apiviz.landmark
[...]

If those are errors are related to the process of building docs, is it possible to build Elki without building the documentation?

kno10 commented 8 years ago

There are Maven options to not build JavaDoc and/or not run tests.

But a missing JavaDoc tag should not be a fatal error, only a warning. But apparently, some versions of Java 8 fail with an error now - mine (Debian OpenJDK doesn't): http://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html

Try -Dmaven.javadoc.opts='-Xdoclint:none'.

lifepillar commented 8 years ago

No way, same errors. Btw, don't you provide pre-built jars?

kno10 commented 8 years ago

Only of release versions.

kno10 commented 8 years ago

Please try building the latest master. I've tried to add -Xdoclint:none for Oracle Java 8, and the documentation generator now only supports the V3 parameterization, so it should no longer try to instatiate above cloass, so probably closing this issue.

lifepillar commented 8 years ago

I confirm that the current master builds on OS X. Thanks!