connection to midlet from v3xx

Hi

I have writte a simple midlet which goes to a servlet on the web and gets a simple text string. Now on the generic emulator my midlet runs perfectly however when I load the app onto my motorola v3xx phone the app freezes when I try and contact the servlet. I cannot use the v3xx emulator because every time I try running it the jblend.exe file freezes and tries unsuccesfully to instal something.

If someone could help me either with my midlet or with my motorola emulator I'd really apreciate it!

Thanks

here is the problematic function:

private String dbConnect()

{

String myString ;

HttpConnection hc = null;

InputStream in = null;

//String url = "http://localhost:8080/freshnetProj/testservlet";

String url = "http://64.202.176.93:9080/freshnetproj/testservlet";

try

{

hc = (HttpConnection)Connector.open(url);

in = hc.openInputStream();

int contentLength = (int)hc.getLength();

byte[] raw = new byte[contentLength];

int length = in.read(raw);

in.close();

hc.close();

// Show the response to the user.

myString = new String(raw, 0, length);

}

catch (IOException ioe)

{

myString = ioe.toString();

}

return myString;

}

[1308 byte] By [Aharona] at [2007-11-27 9:59:38]
# 1
try to establish the connection within a thread.it may help u, coz once i faced such problem and i recovered:) :) :)
MicroEditiona at 2007-7-13 0:30:42 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 2
the whole function is already accessed in a new threadAs follows:Thread t = new Thread() {public void run() {connect();}};t.start();Thanks anyway!
Aharona at 2007-7-13 0:30:42 > top of Java-index,Java Mobility Forums,Java ME Technologies...