title: CouchDb, Java: HTTP entity may not be null
body: <p>In my Java application Im trying to connect to couchDb on external server. I see error message connection timed out.</p>
  
  <p>error msg:</p>
  
  <pre><code>SEVERE: Allocate exception for servlet servlets.Chat
  java.lang.IllegalArgumentException: **HTTP entity may not be null**
      at org.apache.http.util.EntityUtils.toString(EntityUtils.java:200)
      at org.apache.http.util.EntityUtils.toString(EntityUtils.java:273)
  </code></pre>
  
  <p>My CouchDb properties </p>
  
  <pre><code>CouchDbProperties prop = new CouchDbProperties()
      .setDbName("lcouchdb")
      .setCreateDbIfNotExist(true)
      .setHost("chatapp.couchappy.com")
      .setPort(80)
      .setUsername("abc@gmail.com")
      .setPassword("bla blaaa")
      .setProtocol("http");       
  </code></pre>
  
  <p>I have tried removing .setPort(80) again my app throws an error </p>
  
  <pre><code>    java.lang.IllegalArgumentException: Port is invalid: 0
  </code></pre>