Welcome to the Official BlackBerry® Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
New Developer
nano
Posts: 2
Registered: 03-30-2009

How to recovery from HttpConnection timout Exception

  Our application makes HttpConnection to sync the large files from online server. We support users with WiFi, bes,  bis, or wap connection. Sometimes, druring the sync, HttpConnection throws timeout exception (for example: device 8100, build with JDE 4.7). We catch the exception, close it and try to make new one. But this new HttpConnection never works. At the same time, it seems that network connection is also affected. The internet browser doesn't work anymore. But phone still works. The only way to get network connectivity back is hard reset the device. Any suggestion?

Please use plain text.
Developer
BBDeveloper
Posts: 3,951
Registered: 07-15-2008

Re: How to recovery from HttpConnection timout Exception

Is this observed on all the devices you tested or any specific device and OS version.

 

Have you tried using JDE for debugging on device.


Use Search. "Accept Solution" If the problem is resolved.
Please use plain text.
Developer
RexDoug
Posts: 4,649
Registered: 07-21-2008

Re: How to recovery from HttpConnection timout Exception

[ Edited ]

You say "device is 8100 build with JDE 4.7" - building your app on 4.7 and running it on an 8100 is not supported and sure to cause issues.

 

I'm guessing your 8100 is running 4.3 or 4.5 - you'll have to use JDE 4.3 or JDE 4.5 for this unit.

 

Message Edited by RexDoug on 04-01-2009 09:12 AM
Please use plain text.
Developer
marchywka
Posts: 1,415
Registered: 07-30-2008

Re: How to recovery from HttpConnection timout Exception

Someone IIRC reported a credible memory or resource  leak with IO on some OS's. Anyone know how that turned out? Normally failure to

close wouldn't kill your browser or other apps AFAIK.

 

Please use plain text.
New Developer
nano
Posts: 2
Registered: 03-30-2009

Re: How to recovery from HttpConnection timout Exception

This scenario has been reproduced in multiple simulators. Our customers are also reported with different devices. From debuging, we found out that exception is HttpConnection timeout exception. Our application transfer 10MB file to the device. It makes HttpConnection to sync 500K each time. Then the connection was closed. Our goal is to be able to close bad timeout connection when it happens and make new one to continue file transfer.
Please use plain text.
Developer
marchywka
Posts: 1,415
Registered: 07-30-2008

Re: How to recovery from HttpConnection timout Exception

Eh, if you can reliably reproduce this is simulator you can step through the failing subsequent calls

and see who is rejecting your later connection. You don't have source coed but you have a call stack and various

arguments or members available. 

 

You may want to consider byte-range requests for files that large over wireless.

 

Please use plain text.
Developer
RexDoug
Posts: 4,649
Registered: 07-21-2008

Re: How to recovery from HttpConnection timout Exception

[ Edited ]

First, are you (or are you not?) compiling on 4.7 and running on a lower OS level? This is what you stated in the original post, and is not supported.

 

Second, you cannot send blocks of 500K over BIS (for sure) nor BES (probably). BES has a 256K default limit on a single post, BIS has a 60K limit.

 

I'm really hearing two issues here:  (1) timeout exception, and (2) TCP stack now hosed and cannot reconnect.

 

#1 I've seen for sure.  #2, never heard of this. I support multiple apps that move large amounts of data (although probably not 10Mb), and I've never seen this.

 

Message Edited by RexDoug on 04-01-2009 03:32 PM
Please use plain text.