Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Contributor
Posts: 19
Registered: ‎01-05-2011
My Device: Not Specified

net.rim.device.api.io.ConnectionClosedException: Not connected

I am using "HttpConnectionFactory" class available online for making http connection.

 

I tried to create HTTPConnection on a particular URL. Connection making is fine(without any exception).

But, when i try to obtain response code, it throws following exception.

net.rim.device.api.io.ConnectionClosedException: Not connected 

 

Not, able to figure out the reason behind it??

 

Thanks in advance.. Smiley Happy

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: net.rim.device.api.io.ConnectionClosedException: Not connected

Unless you are using https,,the conneciton will not be attempted until you request the response code.  So it is only then it is finding a problem. 

 

Check your URL and the connection method you are trying to use.  Check that the browser can see your URL. 

Contributor
Posts: 19
Registered: ‎01-05-2011
My Device: Not Specified

Re: net.rim.device.api.io.ConnectionClosedException: Not connected

Thanks Peter.

 

But, forgot to mention

 

a) This problem comes only on blackberry simulator not on handheld(tested 9900). It make me doubtful of some condition which might throw exception on any particular device.

 

b) I am just providing sample url for ur reference(it's not actual/working url)

 

URL is like this:

http://a.com/b/page1.jsp;jsessionid=c.d12

Extra string is like:

;deviceside=true

 

Can there be any issue because of presence of "." and ";" in this url ??