09-22-2009 03:14 AM
I am trying to debug my application with device by attaching it to JDE. My application uses an HTTP connection. As, I tried to run the application it gives attach:success and the next line is java.io.IOException:Tunnel Failed.
I am using a wi-fi connection to connect to Internet. I am successfully able to connect the particular url with BB Browser and also able to open other URL's with Browser, buut my aaplication is not running in device due to this.
Can u plz. guide me how to resolve this and run my application. Thnx for the any help.
Solved! Go to Solution.
09-22-2009 03:30 AM
Have you checked you have the proper data plan for sending and receiving data.
Have you gone thru the peter's sticky thread for networking.
09-22-2009 03:36 AM
Thnx for the quick response.
Yeah, I hv checked my plans they are alright as the same plan we are using for other mobiles in our company. And its working fine with them. Its my first application in BB with http connection, hence I am facing this problem. I think I will hv to go thruthat sticky thread once again.
09-22-2009 03:38 AM
09-22-2009 04:01 AM
"I am using a wi-fi connection to connect to Internet."
As you will find, if you review the sticky Thread, you need to code the suffix ";interface=wifi" to force use of WiFi.
If the error message mentions tunnel, then typically you are specifying or using by default the direct TCP connection, for which you may need to specify APN values.
If you don't resolve the problem yourself, it would be good to know the full URL you are using (especially the suffix), your carrier and the device and OS Level.
09-22-2009 06:52 AM
I hv tried to debug my app again with device, after adding the following method and appending it with my URL.
public static String appendConnectionString()
ServiceRecord ippprecordArray = ServiceBook.getSB().findRecordsByCid("IPPP");
if (ippprecordArray == null)
int numRecords = ippprecordArray.length;
for (int i = 0; i < numRecords; i++)
ServiceRecord ipppRecord = ippprecordArray[i];
if (ipppRecord.isValid() && ipppRecord.getName().equals("IPPP for BIBS"))
return ";deviceside=false;ConnectionUID=" + ipppRecord.getUid();
Now, it throws an uncaught exception with value: @63EA8000 and Type: unknown(net_rim_cldc-14,19). Plz. help me to resolve. This is urgent.
09-22-2009 12:37 PM
I'm confused by your connection string logic, it doesn't seem to match anything I use. Where did you get it from?
Have you looked at:
What Is - Different ways to make an HTTP or socket connection
Article Number: DB-00396
It has different logic for determining the ConnectUID.
So you need to check that your code is valid.
That aside, you should be able to give us more that you have about the Exception. For example, the Exception will have a detail message and it will be associated with a specific line. If you are debugging on the device and have a consistent level of software, the on device debugging should indicate the line that has the Exception as well.
What you have given us is not enough sorry.
09-23-2009 07:40 AM
I m trying to fight with this since yesterday and back to home(forum), as I hv tired of all above. And plz. help me to get rid of this.. I think there is no problem with my code, bcoz I am not able to connect with other http applications on my device, not even HttpDemo in samples. All give the same exception Tunnel Failed...!!
Plz plz help..
09-23-2009 07:51 AM - edited 09-23-2009 07:56 AM
Have a look
I had same problem "Tunnel Failed"
It was solved by changing the carrier...try switching to other network provider. And give proper APN.
09-23-2009 08:03 AM
I am using Airtel, with no data plans and using Wifi connection of my company for internet connectivity.