BlackBerry JDE httpdemo program throws an exception on BlackBerry device

778 views Asked by At

When I run HttpDemo of 'Blackberry samples' on a 5.0 device, I get an exception:

net.rim.device.internal.io.CriticalIOException: Critical tunnel failure

But it works fine in the simulator. What are the possible reasons for this exception, and what are ways to overcome it?

2

There are 2 answers

5
Adil Soomro On

Critical tunnel failure indicates that your device has not properly configured APN setting in Options>Advanced Option>TCP/IP. the APN is provided by your service provider. You also can use Wifi as an alternate. But if you want to use Direct TCP you have to provide APN.

0
Eric Giguere On

There are various ways to make an HTTP connection on the BlackBerry depending on what model you have and what carrier you're using. The best solution is to use Versatile Monkey's network helper class. It queries the service books on the system to find the right way to make a connection.