I was able to solve the issue by adding this small snippet of code wich did the trick.
import java.io.IOException;
import java.net.MalformedURLException;
import com.google.enterprise.apis.client.GsaClient;
import com.google.enterprise.apis.client.GsaEntry;
import com.google.gdata.util.ServiceException;
public class GsaFirst {
static {
//for localhost testing only
javax.net.ssl.HttpsURLConnection.setDefaultHostnameVerifier(
new javax.net.ssl.HostnameVerifier(){
public boolean verify(String hostname,
javax.net.ssl.SSLSession sslSession) {
if (hostname.equals("Myhostname.net")) {
return true;
}
return false;
}
});
}
public static void main(String args[]) throws MalformedURLException, ServiceException, IOException{
System.out.println("The program started...");
GsaClient myClient = new GsaClient("Myhostname.net", 8443, "username", "pwd1234");
System.out.println("this is the error");
//String addr = myClient.getAddress();
//System.out.println(addr);
GsaEntry myEntry = myClient.getEntry("config", "crawlURLs");
System.out.println("Start URLs: " + myEntry.getGsaContent("startURLs"));
System.out.println("Follow URLs: " + myEntry.getGsaContent("followURLs"));
System.out.println("Do Not Crawl URLs: " + myEntry.getGsaContent("doNotCrawlURLs"));
}