I am Developing GPS based app in J2me . I am new in the Google API coding. When I give command to map on after another for example Up, Down, zoom, zoom-out, the Google Static Map API gives me the two error on two different emulators at this code - inputStream = connection.openInputStream(); :-

(When using Nokia SDK 1.0 or 2.0)
java.io.IOException: No Response Entries Available
null
at com.sun.midp.io.InternalConnector.openPrim(+157)
at com.sun.midp.io.InternalConnector.openInternal(+9)
at com.sun.midp.io.j2me.http.Protocol.connect_wap(+210)
at com.sun.midp.io.j2me.http.Protocol.connect(+107)
at com.sun.midp.io.j2me.http.Protocol.openInputStream(+64)
at midletgps.GoogleMaps.run(GoogleMaps.java:90)
What is the meaning of this error & how should I resolved that?? Plz help me.. I stucked here because of this problem...

(When using Oracle emulator 3.0.5)
java.io.IOException: Resource limit exceeded for TCP client sockets
at com.sun.midp.io.j2me.socket.Protocol.open0(), bci=0
at com.sun.midp.io.j2me.socket.Protocol.connect(), bci=169
at com.sun.midp.io.j2me.socket.Protocol.open(), bci=133
at com.sun.midp.io.j2me.socket.Protocol.openPrim(), bci=4
at com.sun.midp.io.j2me.http.Protocol.createConnection(), bci=13
at com.sun.midp.io.j2me.http.Protocol.connect(), bci=43
at com.sun.midp.io.j2me.http.Protocol.streamConnect(), bci=109
at com.sun.midp.io.j2me.http.Protocol.startRequest(), bci=9
at com.sun.midp.io.j2me.http.Protocol.sendRequest(), bci=35
at com.sun.midp.io.j2me.http.Protocol.sendRequest(), bci=3
at com.sun.midp.io.j2me.http.Protocol.openInputStream(), bci=6
- midletgps.GoogleMaps.run(GoogleMaps.java:90)
at java.lang.Thread.run(Thread.java:619)

My connection code is as follows :

//the query string for the Google service

String url = "http://maps.google.com/maps/api/staticmap?center=";
url += latitude + "," + longitude;
url += "&zoom=" + String.valueOf(zoom);
url += "&size=" + width + "x" + height + "&maptype=hybrid" +"&sensor=true" + "&key=API key";
try
{
connection = (HttpConnection)Connector.open(url);
connection.setRequestMethod(HttpConnection.GET);
inputStream = connection.openInputStream();
map = Image.createImage(inputStream);
setImage(map);
iserror=false;
repaint();
midGPS.displayMap();
}
catch (Exception ex)
{
iserror=true;
ex.printStackTrace();
}
finally
{
try
{
if (connection != null)
{
connection.close();
}
}
catch (Exception ex)
{
ex.printStackTrace();
}
}