Project

General

Profile

Taxonomic Editor development environment

The main source of information is Setting up a Taxonomic Editor development environment and #4227

This page only contains additional information not yet contained in the above linked page.

Download timeouts in the maven validate phase

This especially happens with the http://download.eclipse.org/releases/ repository from where plugins have to be downloaded.

The according error message in the maven log is:

[ERROR] Internal error: java.lang.RuntimeException: Failed to load p2 repository with ID 'eclipse-swtbot' from location http://download.eclipse.org/releases/indigo/: Unable to read repository at http://download.eclipse.org/releases/indigo. Unable to read repository at http://download.eclipse.org/releases/indigo/201109230900/content.jar. Read timed out -> [Help 1]

Running maven in the debug mode (-X) reveals that this is a socket timeout:

Caused by: java.net.SocketTimeoutException: Read timed out
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
    at java.net.SocketInputStream.read(SocketInputStream.java:170)
    at java.net.SocketInputStream.read(SocketInputStream.java:141)
    at org.apache.http.impl.io.AbstractSessionInputBuffer.read(AbstractSessionInputBuffer.java:198)
    at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:178)
    at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:137)
    at java.io.FilterInputStream.read(FilterInputStream.java:133)
    at java.io.FilterInputStream.read(FilterInputStream.java:107)
    at org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer$1.performFileTransfer(AbstractRetrieveFileTransfer.java:178)
    at org.eclipse.ecf.filetransfer.FileTransferJob.run(FileTransferJob.java:73)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

In the above download process two classes are involved which have different timeoiut settings:

  • org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer
  • java.net.SocketInputStream

setting timeout controls for JRE-http based transport in org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer

See http://wiki.eclipse.org/Equinox/p2/TransportDebugging.

In case of equinox transport timeouts, a message like the following should become visible in the log.

    Timeout while reading input stream.
    The following system properties can be used to adjust the readTimeout, retryAttempts, and closeTimeout
    org.eclipse.ecf.provider.filetransfer.retrieve.readTimeout=xxx
    org.eclipse.ecf.provider.filetransfer.retrieve.retryAttempts=xxx
    org.eclipse.ecf.provider.filetransfer.retrieve.closeTimeout=xxx

Setting the waggon timeouts in the setting.xml

This is the recommended solution!

see http://maven.apache.org/guides/mini/guide-http-settings.html and http://stackoverflow.com/questions/23510525/maven-dependency-timeout-settings#27015320

This setting is supposed to configure the java.net.SocketInputStream timeouts which therefore is the correct one in order to fix the above problem.

Setting in the ~/.m2/settings.xml

<server>
  <id>eclipse-swtbot</id>
  <!-- username and password are required otherwise the tycho P2PasswordUtil will fail with an NPE -->
  <username></username>
  <password></password>
  <configuration>
    <httpConfiguration>
      <all>
        <connectionTimeout>180000</connectionTimeout>
        <readTimeout>180000</readTimeout>
      </all>
    </httpConfiguration>
  </configuration>
</server>

The error which is thrown when the user credentials are missing:

[ERROR] Internal error: java.lang.NullPointerException -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:121)
        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:497)
        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: java.lang.NullPointerException
        at org.eclipse.tycho.p2.remote.P2PasswordUtil.setCredentials(P2PasswordUtil.java:69)
        at org.eclipse.tycho.p2.remote.RemoteRepositoryLoadingHelper.setPasswordForLoading(RemoteRepositoryLoadingHelper.java:124)
        at org.eclipse.tycho.p2.remote.RemoteRepositoryLoadingHelper.getEffectiveLocationAndPrepareLoad(RemoteRepositoryLoadingHelper.java:82)
        at org.eclipse.tycho.p2.remote.RemoteMetadataRepositoryManager.translateAndPrepareLoad(RemoteMetadataRepositoryManager.java:47)
        at org.eclipse.tycho.p2.remote.RemoteMetadataRepositoryManager.loadRepository(RemoteMetadataRepositoryManager.java:57)
        at org.eclipse.tycho.p2.remote.RemoteMetadataRepositoryManager.loadRepository(RemoteMetadataRepositoryManager.java:52)
        at org.eclipse.tycho.p2.target.TargetPlatformFactoryImpl.loadMetadataRepository(TargetPlatformFactoryImpl.java:297)
        at org.eclipse.tycho.p2.target.TargetPlatformFactoryImpl.gatherExternalInstallableUnits(TargetPlatformFactoryImpl.java:269)
        at org.eclipse.tycho.p2.target.TargetPlatformFactoryImpl.createTargetPlatform(TargetPlatformFactoryImpl.java:174)
        at org.eclipse.tycho.p2.target.TargetPlatformFactoryImpl.createTargetPlatform(TargetPlatformFactoryImpl.java:126)
        at org.eclipse.tycho.p2.target.TargetPlatformFactoryImpl.createTargetPlatform(TargetPlatformFactoryImpl.java:1)
        at org.eclipse.tycho.p2.manager.ReactorRepositoryManagerImpl.computePreliminaryTargetPlatform(ReactorRepositoryManagerImpl.java:82)
        at org.eclipse.tycho.p2.resolver.P2DependencyResolver.computePreliminaryTargetPlatform(P2DependencyResolver.java:221)
        at org.eclipse.tycho.core.resolver.DefaultTychoResolver.resolveProject(DefaultTychoResolver.java:109)
        at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:77)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:266)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
        ... 11 more
[ERROR] 

Further informations especially for remoting you can find here Taxonomic Editor Developers Guide

Add picture from clipboard (Maximum size: 40 MB)