title: Generate Google Cloud Endpoint Lib Failure with SocketTimeoutException: Read timed out
body: <p>Google app engine sdk version is 1.8.9
  Google Plugin for Eclipse with <a href="https://dl.google.com/eclipse/plugin/4.3" rel="nofollow">https://dl.google.com/eclipse/plugin/4.3</a>
  OS version is windows 7 x64
  Language is English</p>
  
  <p>Try to use the eclipse 4.3 to create the Guestbook sample as <a href="https://developers.google.com/appengine/docs/java/endpoints/getstarted/backend/" rel="nofollow">https://developers.google.com/appengine/docs/java/endpoints/getstarted/backend/</a></p>
  
  <p>The sample project can be build/deploy successfully. And the API also is tested ok. </p>
  
  <p>But when try to use the google->generate cloud endpoint client libary, it will prompt an error, the error trace is as below (PS: Also tried with command line, still failed.):</p>
  
  <pre><code> - Error Details --
  Date: Mon Feb 10 20:47:49 CST 2014
  Message: Unexpected Exception
  Severity: Error
  Product: Eclipse 2.0.0.20130613-0530 (org.eclipse.epp.package.mobile.product)
  Plugin: com.google.gdt.eclipse.appengine.swarm
  Exception Stack Trace:
  java.lang.reflect.InvocationTargetException
      at com.google.gdt.eclipse.appengine.swarm.wizards.GenerateSwarmApiAction$1.run(GenerateSwarmApiAction.java:82)
      at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
  Caused by: com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmGenerationException: java.net.SocketTimeoutException: Read timed out
      at com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmApiCreator.createClientLibFromApiConfig(SwarmApiCreator.java:144)
      at com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmApiCreator.createSwarmApi(SwarmApiCreator.java:258)
      at com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmServiceCreator.create(SwarmServiceCreator.java:444)
      at com.google.gdt.eclipse.appengine.swarm.wizards.GenerateSwarmApiAction$1.run(GenerateSwarmApiAction.java:80)
      ... 1 more
  Caused by: java.net.SocketTimeoutException: Read timed out
      at java.net.SocketInputStream.socketRead0(Native Method)
      at java.net.SocketInputStream.read(SocketInputStream.java:152)
      at java.net.SocketInputStream.read(SocketInputStream.java:122)
      at sun.security.ssl.InputRecord.readFully(InputRecord.java:442)
      at sun.security.ssl.InputRecord.read(InputRecord.java:480)
      at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:927)
      at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:884)
      at sun.security.ssl.AppInputStream.read(AppInputStream.java:102)
      at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
      at java.io.BufferedInputStream.read1(BufferedInputStream.java:275)
      at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
      at sun.net.www.MeteredStream.read(MeteredStream.java:134)
      at java.io.FilterInputStream.read(FilterInputStream.java:133)
      at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:3053)
      at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:3047)
      at com.google.api.server.spi.IoUtil.copy(IoUtil.java:57)
      at com.google.api.server.spi.tools.CloudClientLibGenerator.copyJar(CloudClientLibGenerator.java:88)
      at com.google.api.server.spi.tools.CloudClientLibGenerator.generateClientLib(CloudClientLibGenerator.java:45)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmApiCreator.createClientLibFromApiConfig(SwarmApiCreator.java:142)
      ... 4 more
  Root exception:
  com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmGenerationException: java.net.SocketTimeoutException: Read timed out
      at com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmApiCreator.createClientLibFromApiConfig(SwarmApiCreator.java:144)
      at com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmApiCreator.createSwarmApi(SwarmApiCreator.java:258)
      at com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmServiceCreator.create(SwarmServiceCreator.java:444)
      at com.google.gdt.eclipse.appengine.swarm.wizards.GenerateSwarmApiAction$1.run(GenerateSwarmApiAction.java:80)
      at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
  Caused by: java.net.SocketTimeoutException: Read timed out
      at java.net.SocketInputStream.socketRead0(Native Method)
      at java.net.SocketInputStream.read(SocketInputStream.java:152)
      at java.net.SocketInputStream.read(SocketInputStream.java:122)
      at sun.security.ssl.InputRecord.readFully(InputRecord.java:442)
      at sun.security.ssl.InputRecord.read(InputRecord.java:480)
      at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:927)
      at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:884)
      at sun.security.ssl.AppInputStream.read(AppInputStream.java:102)
      at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
      at java.io.BufferedInputStream.read1(BufferedInputStream.java:275)
      at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
      at sun.net.www.MeteredStream.read(MeteredStream.java:134)
      at java.io.FilterInputStream.read(FilterInputStream.java:133)
      at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:3053)
      at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:3047)
      at com.google.api.server.spi.IoUtil.copy(IoUtil.java:57)
      at com.google.api.server.spi.tools.CloudClientLibGenerator.copyJar(CloudClientLibGenerator.java:88)
      at com.google.api.server.spi.tools.CloudClientLibGenerator.generateClientLib(CloudClientLibGenerator.java:45)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmApiCreator.createClientLibFromApiConfig(SwarmApiCreator.java:142)
      ... 4 more
  </code></pre>
  
  <p>The code is simple as below:
  Greetings.java:
      package com.test.guestbook;</p>
  
  <pre><code>import java.util.ArrayList;
  
  import javax.inject.Named;
  
  import com.google.api.server.spi.config.Api;
  import com.google.api.server.spi.config.ApiMethod;
  import com.google.appengine.api.users.User;
  /**
   * Defines v1 of a helloworld API, which provides simple "greeting" methods.
   */
  @Api(name = "helloworld", version = "v1")
  public class Greetings {
    public static ArrayList&lt;HelloGreeting&gt; greetings = new ArrayList&lt;HelloGreeting&gt;();
  
    static {
      greetings.add(new HelloGreeting("hello world!"));
      greetings.add(new HelloGreeting("goodbye world!"));
    }
  
    public HelloGreeting getGreeting(@Named("id") Integer id, User user) {
      return greetings.get(id);
    }
  
  
  }
  </code></pre>
  
  <p>HelloGreeting.java</p>
  
  <pre><code>package com.test.guestbook;
  
  public class HelloGreeting {
       public String message;
  
        public HelloGreeting() {};
  
        public HelloGreeting(String message) {
          this.message = message;
        }
  
        public String getMessage() {
          return message;
        }
  
        public void setMessage(String message) {
          this.message = message;
        }
      }
  </code></pre>