BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 12-03-2007, 03:41 AM   #1 (permalink)
New Member
 
Join Date: Aug 2007
Model: 8700
PIN: N/A
Carrier: optus
Posts: 3
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default ConnectionNotFoundException

Please Login to Remove!

Hi All,

I am developing an application. The application calls a website via HTTP passing some parameters and waits for the response.

I have tested it on some of the newer devices and it works fine but now I am testing it on a 8707 (Java 4.1.0.347). When I run the program for the first time it says "This program is attempting a HTTP request" I accept this but then it immediated throws the following exception:

javax.microedition.io.ConnectionNotFoundException: Protocol not found: null

Based on that error it appears that it is saying that the device does not support HTTP? But I can browse the internet fine from the device.

I have installed the application OTA from my website.

My gut feeling it is a device setting? Someone mentioned that it is possible to choose between using the carrier internet proxy or BIS? But I do not know how to change this?

I am on Optus in Australia

I have tried the following things to fix the problem but with no success

*) try and write a simple program which makes a HTTP connection to Google - same exception is thrown
*) changed from 3G to 2G on the Options>Network page
*) changed the setting for the internet browser to access WML or HTML (although I assume these have no effect on other applications?)
*) changed the security options on my application to "Allow" everything.

I am at a loss. Below is the following code fragment

s = (StreamConnection)Connector.open(getUrl());
HttpConnection httpConn = (HttpConnection)s;
int status = httpConn.getResponseCode();
if (status == HttpConnection.HTTP_OK)
{
InputStream input = s.openInputStream();
<snip>

The exception is thrown on the Connector.open.

It obviously works fine in the Emulator

Any help would be greatly appreciated

thanks

Dan
Offline  
Old 12-06-2007, 06:17 AM   #2 (permalink)
New Member
 
Join Date: Aug 2007
Model: 8700
PIN: N/A
Carrier: optus
Posts: 3
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default ConnectionNotFound

I think that my ConnectionNotFoundIssue has something to do with needing to specify APN details as parameters at the end of the URL HTTP request

I have seen a few references on the web for Optus APN details.

The HTTP request appears to take a number of parameters RIM Device Java Library: Class Connector

But I can only find reference to:

WAPGatewayAPN=wap.optus.net.au;
WapGatewayIP=202.139.83.152;
WapGatewayPort=9201

does anyone know what the sourceIP and port refer to OR whether this is likely to have any effect on my connection issue?

thanks in advance

Dan
Offline  
Old 12-06-2007, 01:24 PM   #3 (permalink)
Knows Where the Search Button Is
 
Join Date: Nov 2007
Model: 8700c
PIN: N/A
Carrier: AT&T
Posts: 32
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm new to blackberry coding as well so may well be wrong. I dont think it's an APN issue. Did you try printing out a detailed message?

ConnectionNotFoundException(String s)
Constructs a ConnectionNotFoundException with the specified detail message.

try print out the string to the screen. Maybe it'll provide some more detailed info. Are you running it on the device or on the simulator?
Offline  
Old 12-28-2007, 10:39 PM   #4 (permalink)
New Member
 
Join Date: Aug 2007
Model: 8700
PIN: N/A
Carrier: optus
Posts: 3
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

It was an APN issue and is now resolved. The SIM card was not correctly setting the Service Book so the connection information was returning a null. Explicitly setting the WAP details in the connection string resolved the issue.

which was blackberry.wap for Optus.
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright 2004-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.