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
New Developer
declanshanaghy
Posts: 8
Registered: ‎03-20-2009
My Device: Not Specified

Problem downloading data from web.

My app is loading an XML feed over the web.

The XML feed contains URLs of image which i also need to download.

 

After downloading the feed i populate my UI and use a custom BitmapField which proxies the image download ina  thread pool.

 

At first i had an unbounded thread pool and that worked fine on the simulator but not on the device.

I kept getting this error:

 

Process=cnn(171) already in table
Tunnel id=1mode=FG already referenced by process=cnn(171)
IOException
Connection not writeable
net_rim_cldc-5
 RimConnection
 checkForWriteable
 0x818C
net_rim_cldc-5
 RimStreamConnection
 openOutputStream
 0x959C
net_rim_os-2
 Protocol
 <private>
 0x8098
net_rim_os-2
 Protocol
 openPrim
 0x7C7E
net_rim_cldc-16
 RIMConnector
 <private>
 0xA593
net_rim_cldc-16
 RIMConnector
 open
 0xA2B7
net_rim_cldc-2
 Connector
 open
 0x1EA6
net_rim_os-3
 Protocol
 openPrim
 0x66AB
net_rim_cldc-16
 RIMConnector
 <private>
 0xA593
net_rim_cldc-16
 RIMConnector
 open
 0xA2B7
net_rim_cldc-2
 Connector
 open
 0x1EA6
cnn-1
 IOUtil

 

 

I figured i was creating too many threads, so i locked it down to process 1 request at a time but i still get the same error.

Can anyone provide any insight on this error please?

 

Developer
Ted_Hopp
Posts: 1,305
Registered: ‎01-21-2009
My Device: Not Specified

Re: Problem downloading data from web.

If you're opening your connection using Connector.READ, try using Connector.READ_WRITE. Even though you may only be calling getInputStream, it still needs to write to the connection. Also, if you're using the static Connector.openInputStream, change it to open the connection and then call openInputStream() on the connection instance.



Solved? click "Accept as solution". Helpful? give kudos by clicking on the star.