title: Creating Loadbalancer using AWS Java SDK
body: <p>I am trying to create a Loadbalancer using AWS java sdk.
  But i am getting AmazonServiceException with Status code as 400, but other fields (like AWS request id, AWS error code etc) are null. I am not able to get what is the issue.</p>
  
  <p>Below is the code snippet i am using to create loadbalancer. </p>
  
  <pre><code>    elb = new AmazonElasticLoadBalancingClient(credentials);
      elb.setEndpoint("endPoint");
  
  
  
      CreateLoadBalancerRequest lbRequest = new CreateLoadBalancerRequest();
      lbRequest.setLoadBalancerName(lbName);
      List&lt;Listener&gt; listeners = new ArrayList&lt;Listener&gt;(1);
      listeners.add(new Listener(lbProtocol, lbPort, instancePort));
      lbRequest.withAvailabilityZones(availablezone1,availablezone2);
      lbRequest.setListeners(listeners);
      try{
           CreateLoadBalancerResult lbResult = elb.createLoadBalancer(lbRequest);
      } catch (AmazonServiceException e){
          e.printStackTrace();
      }catch (AmazonClientException e){
          e.printStackTrace();
      }
  </code></pre>
  
  <p>I am getting the below exception:</p>
  
  <p>Status Code: 400, AWS Service: AmazonElasticLoadBalancing, AWS Request ID: null, AWS Error Code: null, AWS Error Message: null
      at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:583)
      at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:317)
      at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:167)
      at com.amazonaws.services.elasticloadbalancing.AmazonElasticLoadBalancingClient.invoke(AmazonElasticLoadBalancingClient.java:1224)
      at com.amazonaws.services.elasticloadbalancing.AmazonElasticLoadBalancingClient.createLoadBalancer(AmazonElasticLoadBalancingClient.java:675)</p>