Application does not work without wifi connection

Hello I have a problem with the http connection

my code is

public class HttpConnectionFactory
{

    /**
     * Specifies that only wifi should be used
     */
    public static final int TRANSPORT_WIFI = 1;

    /**
     * Specifies that only BES (also known as MDS or corporate servers)
     */
    public static final int TRANSPORT_BES = 2;

    /**
     * Specifies that only BIS should be used (Basically RIM hosted BES)
     */
    public static final int TRANSPORT_BIS = 4;

    /**
     * Specifies that TCP should be used (carrier transport)
     */
    public static final int TRANSPORT_DIRECT_TCP = 8;

    /**
     * Specifies that WAP2 should be used (carrier transport)
     */
    public static final int TRANSPORT_WAP2 = 16;

    /**
     * Equivalent to: TRANSPORT_WIFI | TRANSPORT_BES | TRANSPORT_BIS |
     * TRANSPORT_DIRECT_TCP | TRANSPORT_WAP2
     */
    public static final int TRANSPORTS_ANY = TRANSPORT_WIFI | TRANSPORT_BES
            | TRANSPORT_BIS | TRANSPORT_DIRECT_TCP | TRANSPORT_WAP2;

    /**
     * Equivalent to: TRANSPORT_WIFI | TRANSPORT_BES | TRANSPORT_BIS
     */
    public static final int TRANSPORTS_AVOID_CARRIER = TRANSPORT_WIFI
            | TRANSPORT_BES | TRANSPORT_BIS;

    /**
     * Equivalent to: TRANSPORT_DIRECT_TCP | TRANSPORT_WAP2
     */
    public static final int TRANSPORTS_CARRIER_ONLY = TRANSPORT_DIRECT_TCP
            | TRANSPORT_WAP2;

    /**
     * The default order in which selected transports will be attempted
     *
     */
    public static final int DEFAULT_TRANSPORT_ORDER[] = { // TRANSPORT_DIRECT_TCP
    // ,TRANSPORT_WAP2
            TRANSPORT_WIFI,
            // TRANSPORT_BES, TRANSPORT_BIS,
            // TRANSPORT_WAP2,
            TRANSPORT_DIRECT_TCP };

    private static final int TRANSPORT_COUNT = DEFAULT_TRANSPORT_ORDER.length;

    private static ServiceRecord srMDS[], srBIS[], srWAP2[], srWiFi[];
    private static boolean serviceRecordsLoaded = false;

    private int curIndex = 0;
    private int curSubIndex = 0;
    // private String url;
    private final String extraParameters;
    private final int transports[];
    private int lastTransport = 0;

    /**
     * Equivalent to
     * HttpConnectionFactory( url, null, HttpConnectionFactory.DEFAULT_TRANSPORT_ORDER )
     *
     * @see #HttpConnectionFactory(String, String, int[])
     * @param url
     *            See {@link #HttpConnectionFactory(String, String, int[])}
     */
    public HttpConnectionFactory() {
        this(null, 0);
    }

    /**
     * Equivalent to
     * HttpConnectionFactory( url, null, allowedTransports )
     *
     * @see #HttpConnectionFactory(String, String, int)
     * @param url
     *            See {@link #HttpConnectionFactory(String, String, int)}
     * @param allowedTransports
     *            See {@link #HttpConnectionFactory(String, String, int)}
     */
    public HttpConnectionFactory(int allowedTransports) {
        this(null, allowedTransports);
    }
    public HttpConnectionFactory(int transportPriority[]) {
        this(null, transportPriority);
    }

    public HttpConnectionFactory(String extraParameters, int allowedTransports) {
        this(extraParameters, transportMaskToArray(allowedTransports));
    }
    public HttpConnectionFactory(String extraParameters,
            int transportPriority[]) {
        if (!serviceRecordsLoaded) {
            loadServiceBooks(false);
        }
        //
        // if (url == null) {
        // throw new IllegalArgumentException("Null URL passed in");
        // }
        // if (!url.toLowerCase().startsWith("http")) {
        // throw new IllegalArgumentException("URL not http or https");
        // }
        //
        // this.url = url;
        this.extraParameters = extraParameters;
        transports = transportPriority;
    }
    public Connection getNextConnection(String url)
            throws NoMoreTransportsException {
        Connection con = null;
        int countsWap = 0;
        int countsBis = 0;
        int countsBes = 0;
        int curTransport = 0;
        while (con == null && curIndex < transports.length) {
            System.out.println("con=" + con + " curid=" + curIndex);
            curTransport = transports[curIndex];
            switch (curTransport) {
            case TRANSPORT_WIFI:
                curIndex++;
                curSubIndex = 0;
                try {
                    con = getWifiConnection(url);
                } catch (Exception e) {
                }
                break;
            case TRANSPORT_BES:
                curIndex++;
                curSubIndex = 0;
                try {
                    if (countsBes > 3) {
                        throw new NoMoreTransportsException();
                    }
                    con = getBesConnection(url);
                    countsBes++;
                } catch (Exception e) {
                }
                break;
            case TRANSPORT_BIS:
                while (con == null) {
                    try {
                        if (countsBis > 3) {
                            throw new NoMoreTransportsException();
                        }
                        con = getBisConnection(url, curSubIndex);
                        countsBis++;
                    } catch (NoMoreTransportsException e) {
                        curIndex++;
                        curSubIndex = 0;
                        break;
                    } catch (Exception e) {
                    }
                }
                break;
            case TRANSPORT_DIRECT_TCP:
                curIndex++;
                try {
                    con = getTcpConnection(url);
                } catch (Exception e) {
                }
                break;
            case TRANSPORT_WAP2:
                while (con == null)
                {
                    // try {
                    // if (countsWap > 3) {
                    // throw new NoMoreTransportsException();
                    // }
                    // // con = getWap2Connection(url, curSubIndex);
                    // countsWap++;
                    // } catch (NoMoreTransportsException e) {
                    // curIndex++;
                    // curSubIndex = 0;
                    // break;
                    // } catch (Exception e) {
                    // }
                }
                break;
            }
        }
        if (con == null) {
            throw new NoMoreTransportsException();
        }

        lastTransport = curTransport;
        return con;
    }

    public Connection getCurrentConnection(String url)
            throws NoMoreTransportsException {
        Connection con = null;
        switch (lastTransport) {
        case TRANSPORT_WIFI:
            try {
                con = getWifiConnection(url);
            } catch (Exception e) {
            }
            break;
        case TRANSPORT_BES:
            try {
                con = getBesConnection(url);
            } catch (Exception e) {
            }
            break;
        case TRANSPORT_BIS:
            while (con == null) {
                try {
                    con = getBisConnection(url, curSubIndex);
                } catch (NoMoreTransportsException e) {
                    break;
                } catch (Exception e) {
                }
            }
            break;
        case TRANSPORT_DIRECT_TCP:
            try {
                con = getTcpConnection(url);
            } catch (Exception e) {
            }
            break;
        case TRANSPORT_WAP2:
            while (con == null) {
                try {
                    con = getWap2Connection(url, curSubIndex);
                    System.out.println("" + con);
                } catch (NoMoreTransportsException e) {
                    break;
                } catch (Exception e) {
                }
            }
            break;
        }

        return con;
    }

    /**
     * Returns the transport used in the connection last returned via
     * {@link #getNextConnection()}
     *
     * @return the transport used in the connection last returned via
     *         {@link #getNextConnection()} or 0 if none
     */
    public int getLastTransport() {
        return lastTransport;
    }

    /**
     * Generates a connection using the BIS transport if available
     *
     * @param index
     *            The index of the service book to use
     * @return An {@link HttpConnection} if this transport is available,
     *         otherwise null
     * @throws NoMoreTransportsException
     * @throws IOException
     *             throws exceptions generated by {@link getConnection( String
     *             transportExtras1, String transportExtras2 )}
     */
    private Connection getBisConnection(String url, int index)
            throws NoMoreTransportsException, IOException {
        System.out.println("BIS Try");
        if (index >= srBIS.length) {
            throw new NoMoreTransportsException("Out of BIS transports");
        }
        ServiceRecord sr = srBIS[index];
        return getConnection(url, ";deviceside=false;connectionUID=", sr
                .getUid());
    }

    /**
     * Generates a connection using the BES transport if available
     *
     * @return An {@link HttpConnection} if this transport is available,
     *         otherwise null
     * @throws IOException
     *             throws exceptions generated by {@link getConnection( String
     *             transportExtras1, String transportExtras2 )}
     */
    private Connection getBesConnection(String url) throws IOException {
        System.out.println("BES try");
        if (CoverageInfo.isCoverageSufficient(CoverageInfo.COVERAGE_MDS)) {
            return getConnection(url, ";deviceside=false", null);
        }
        return null;
    }

    /**
     * Generates a connection using the WIFI transport if available
     *
     * @return An {@link HttpConnection} if this transport is available,
     *         otherwise null
     * @throws IOException
     *             throws exceptions generated by {@link getConnection( String
     *             transportExtras1, String transportExtras2 )}
     */
    private Connection getWifiConnection(String url) throws IOException {
        System.out.println("wifi try");
        // if (RadioInfo.areWAFsSupported(RadioInfo.WAF_WLAN)
        // && (RadioInfo.getActiveWAFs() & RadioInfo.WAF_WLAN) != 0
        // && CoverageInfo.isCoverageSufficient(1 /*
        // * CoverageInfo.COVERAGE_DIRECT
        // */,
        // RadioInfo.WAF_WLAN, false)) {
        //
        // return getConnection(";deviceside=true;interface=wifi", null);
        // // return getConnection(";deviceside=true;interface=wifi", null);
        //
        // }
        // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
        if (WLANInfo.getWLANState() == WLANInfo.WLAN_STATE_CONNECTED
                && srWiFi.length > 0) {
            return getConnection(url, ";interface=wifi", null);
        }
        return null;
    }

    /**
     * Generates a connection using the WAP2 transport if available
     *
     * @param index
     *            The index of the service book to use
     * @return An {@link HttpConnection} if this transport is available,
     *         otherwise null
     * @throws NoMoreTransportsException
     *             if index is outside the range of available service books
     * @throws IOException
     *             throws exceptions generated by {@link getConnection( String
     *             transportExtras1, String transportExtras2 )}
     */
    private Connection getWap2Connection(String url, int index)
            throws NoMoreTransportsException, IOException {
        System.out.println("WAP2 try");
        if (index >= srWAP2.length) {
            throw new NoMoreTransportsException("Out of WAP2 transports");
        }
        if (CoverageInfo
                .isCoverageSufficient(1 /* CoverageInfo.COVERAGE_DIRECT */)) {
            ServiceRecord sr = srWAP2[index];
            return getConnection(url, ";ConnectionUID=", sr.getUid());
        }
        return null;
    }

    /**
     * Generates a connection using the TCP transport if available
     *
     * @return An {@link HttpConnection} if this transport is available,
     *         otherwise null
     * @throws IOException
     *             throws exceptions generated by {@link getConnection( String
     *             transportExtras1, String transportExtras2 )}
     */
    private Connection getTcpConnection(String url) throws IOException {
        System.out.println("direct try");
        if (CoverageInfo
                .isCoverageSufficient(1 /* CoverageInfo.COVERAGE_DIRECT */)) {
            String extraParameter = null;
            if (!DeviceInfo.isSimulator()) {
                url = url + ";deviceside=true";
            }

            return getConnection(url, null, null);
            // ";deviceside=true", null);
        }
        return null;
    }

    /**
     * Utility method for actually getting a connection using whatever transport
     * arguments the transport may need
     *
     * @param transportExtras1
     *            If not null will be concatenated onto the end of the
     *            {@link url}
     * @param transportExtras2
     *            If not null will be concatenated onto the end of {@link url}
     *            after transportExtras1
     * @return An {@link HttpConnection} built using the url and transport
     *         settings provided
     * @throws IOException
     *             any exceptions thrown by {@link Connector.open( String name
     *             )}
     */
    private Connection getConnection(String url, String transportExtras1,
            String transportExtras2) throws IOException {
        StringBuffer fullUrl = new StringBuffer();
        fullUrl.append(url);
        if (transportExtras1 != null) {
            fullUrl.append(transportExtras1);
        }
        if (transportExtras2 != null) {
            fullUrl.append(transportExtras2);
        }
        if (extraParameters != null) {
            fullUrl.append(extraParameters);
        }
        // fullUrl.append(";ConnectionTimeout=5000");
        System.out.println(fullUrl.toString());
        return Connector.open(fullUrl.toString(), Connector.READ_WRITE, true);
    }

    /**
     * Public method used to reload service books for whatever reason (though I
     * can't think of any)
     */
    public static void reloadServiceBooks() {
        loadServiceBooks(true);
    }

    /**
     * Loads all pertinent service books into local variables for later use.
     * Called upon first instantiation of the class and upload {@link
     * reloadServiceBooks()}
     *
     * @param reload
     *            Whether to force a reload even if they've already been loaded.
     */
    private static synchronized void loadServiceBooks(boolean reload) {
        if (serviceRecordsLoaded && !reload) {
            return;
        }
        ServiceBook sb = ServiceBook.getSB();
        ServiceRecord[] records = sb.getRecords();
        Vector mdsVec = new Vector();
        Vector bisVec = new Vector();
        Vector wap2Vec = new Vector();
        Vector wifiVec = new Vector();

        if (!serviceRecordsLoaded) {
            for (int i = 0; i < records.length; i++) {
                ServiceRecord myRecord = records[i];
                String cid, uid;
                // sometimes service record is disabled but works
                if (myRecord.isValid() /* && !myRecord.isDisabled() */) {
                    cid = myRecord.getCid().toLowerCase();
                    uid = myRecord.getUid().toLowerCase();
                    // BIS
                    if (cid.indexOf("ippp") != -1 && uid.indexOf("gpmds") != -1) {
                        bisVec.addElement(myRecord);
                    }
                    // WAP1.0: Not implemented.

                    // BES
                    if (cid.indexOf("ippp") != -1 && uid.indexOf("gpmds") == -1) {
                        mdsVec.addElement(myRecord);
                    }
                    // WiFi
                    if (cid.indexOf("wptcp") != -1 && uid.indexOf("wifi") != -1) {
                        wifiVec.addElement(myRecord);
                    }
                    // Wap2
                    if (cid.indexOf("wptcp") != -1 && uid.indexOf("wap2") != -1) {
                        wap2Vec.addElement(myRecord);
                    }
                }
            }
            srMDS = new ServiceRecord[mdsVec.size()];
            mdsVec.copyInto(srMDS);
            mdsVec.removeAllElements();
            mdsVec = null;

            srBIS = new ServiceRecord[bisVec.size()];
            bisVec.copyInto(srBIS);
            bisVec.removeAllElements();
            bisVec = null;

            srWAP2 = new ServiceRecord[wap2Vec.size()];
            wap2Vec.copyInto(srWAP2);
            wap2Vec.removeAllElements();
            wap2Vec = null;

            srWiFi = new ServiceRecord[wifiVec.size()];
            wifiVec.copyInto(srWiFi);
            wifiVec.removeAllElements();
            wifiVec = null;

            serviceRecordsLoaded = true;
        }
    }

    /**
     * Utility methd for converting a mask of transports into an array of
     * transports in default order
     *
     * @param mask
     *            ORed collection of masks, example:
     *            TRANSPORT_WIFI | TRANSPORT_BES
     * @return an array of the transports specified in mask in default order,
     *         example: { TRANSPORT_WIFI, TRANSPORT_BES }
     */
    private static int[] transportMaskToArray(int mask) {
        if (mask == 0) {
            mask = TRANSPORTS_ANY;
        }
        int numTransports = 0;
        for (int i = 0; i < TRANSPORT_COUNT; i++) {
            if ((DEFAULT_TRANSPORT_ORDER[i] & mask) != 0) {
                numTransports++;
            }
        }
        int transports[] = new int[numTransports];
        int index = 0;
        for (int i = 0; i < TRANSPORT_COUNT; i++) {
            if ((DEFAULT_TRANSPORT_ORDER[i] & mask) != 0) {
                transports[index++] = DEFAULT_TRANSPORT_ORDER[i];
            }
        }
        return transports;
    }
}

HIII, I use this class to call http to the server, but each time that gives the error No more TransportsException
application only works on wifi
I try both GET and POST nothing worked

device: = 8520 os 5.0
BIS service provider:-vodaphone plan 15/day
in that gtalk and facebook works fine

also I test this app in Arabic countries it also does not work

------------------------------after i am test using ---------------------------------------------
networkDignostic link:- http://supportforums.blackberry.com/t5/Java-Development/What-Is-Network-API-alternative-for-legacy-O...

use networkDignostic to test the available transport connection

Here is the result

The Radio Signal level:-81 dBm
WIFI Signal level: No coverage
Network name: Vodafone in
Network type: GPRS
Network services: data + EDGE + voice
PIN: 27F03947
Battery: 81%
= End of network Info =.
Transport: by default (HTTP GET)
Result: failure
Answer:-1
Length:-1
URL: http://www.google.ca:80 /
Journal:

Login to http://www.google.ca:80 /
Opening connection...
Error: net.rim.device.internal.io.CriticalIOException: failed criticism tunnel
= END OF LOG =.

Transport: by default (Socket GET)
Result: failure
Answer:-1
Length:-1
URL: socket: / /www.google.ca:80
Journal:

Connecting to a socket: / /www.google.ca:80
Opening connection...
Error: java.io.IOException: invalid url parameter.
= END OF LOG =.

Transport: by default (HTTP POST)
Result: failure
Answer:-1
Length:-1
URL: http://www.google.ca:80 /
Journal:

Login to http://www.google.ca:80 /
Opening connection...
Error: net.rim.device.internal.io.CriticalIOException: failed criticism tunnel
= END OF LOG =.

Transport: By default (POST plug)
Result: failure
Answer:-1
Length:-1
URL: socket: / /www.google.ca:80
Journal:

Connecting to a socket: / /www.google.ca:80
Opening connection...
Error: java.io.IOException: invalid url parameter.
= END OF LOG =.

Transport: TCP cellular (HTTP GET)
Result: failure
Answer:-1
Length:-1
URL: http://www.google.ca:80 /; deviceside = true
Journal:

Login to http://www.google.ca:80 /; deviceside = true
Opening connection...
Error: net.rim.device.internal.io.CriticalIOException: failed criticism tunnel
= END OF LOG =.

Transport: TCP cell (Socket GET)
Result: failure
Answer:-1
Length:-1
URL: socket: / /www.google.ca:80; deviceside = true
Journal:

Connecting to a socket: / /www.google.ca:80; deviceside = true
Opening connection...
Error: net.rim.device.internal.io.CriticalIOException: failed criticism tunnel
= END OF LOG =.

Transport: TCP cellular (HTTP POST)
Result: failure
Answer:-1
Length:-1
URL: http://www.google.ca:80 /; deviceside = true
Journal:

Login to http://www.google.ca:80 /; deviceside = true
Opening connection...
Error: net.rim.device.internal.io.CriticalIOException: failed criticism tunnel
= END OF LOG =.

Transport: TCP cell (POST plug)
Result: failure
Answer:-1
Length:-1
URL: socket: / /www.google.ca:80; deviceside = true
Journal:

Connecting to a socket: / /www.google.ca:80; deviceside = true
Opening connection...
Error: net.rim.device.internal.io.CriticalIOException: failed criticism tunnel
= END OF LOG =.

Transport: MDS (HTTP GET)
Result: failure
Answer:-1
Length:-1
URL: Not available url
Journal:

Ignored test: no MDS do not service records found.
Ignored test: coverage of SDM is not available

Transport: MDS (Socket GET)
Result: failure
Answer:-1
Length:-1
URL: Not available url
Journal:

Ignored test: no MDS do not service records found.
Ignored test: coverage of SDM is not available

Transport: MDS (HTTP POST)
Result: failure
Answer:-1
Length:-1
URL: Not available url
Journal:

Ignored test: no MDS do not service records found.
Ignored test: coverage of SDM is not available

Transport: MDS (POST plug)
Result: failure
Answer:-1
Length:-1
URL: Not available url
Journal:

Ignored test: no MDS do not service records found.
Ignored test: coverage of SDM is not available

Transport: BIS - B (HTTP GET)
Result: pass
Answer: 200
Length:-1
URL: http://www.google.ca:80 /; deviceside = false; ConnectionType = m * s - pub *
Journal:

Login to http://www.google.ca:80 /; * only given to the RIM ISV partners.
Opening connection...
Open connection
Definition of the properties of application...
Host: www.google.ca
User-Agent: Mozilla/4.0
Connection: close
Get the response code...
Response code: 200
Got the content length:-1 bytes
Downloading content...
Download time: 3,034 seconds
Downloaded: 37943 bytes
Closes the connection...
Connection closed
= END OF LOG =.

Transport: BIS - B (Socket GET)
Result: pass
Answer: 200
Length: 38696
URL: socket: / /www.google.ca:80; deviceside = false; ConnectionType = m * s - could * c
Journal:

Connecting to a socket: / /www.google.ca:80; * only given to the RIM ISV partners.
Opening connection...
Open connection
Send GET request:
"GET / HTTP/1.1".
Host: www.google.ca
User-Agent: Mozilla/4.0
Connection: close

"
Downloading content...
Download time: 2,397 seconds
Downloaded: 38696 bytes
Closing connection
Connection closed
= END OF LOG =.

Transport: BIS - B (HTTP POST)
Result: failure
Answer: 405
Length: 959
URL: http://www.google.ca:80 /; deviceside = false; ConnectionType = m * s - p * ic
Journal:

Login to http://www.google.ca:80 /; * only given to the RIM ISV partners.
Opening connection...
Open connection
Request method POST value
Definition of the properties of application...
Host: www.google.ca
Content-Length: 1500
Content-Type: application/octet-stream
User-Agent: Mozilla/4.0
Connection: close
Display of 1 500 bytes...
Posted 1 500 bytes
Get the response code...
Response code: 405
Got the content length: 959 bytes
Downloading content...
Download time: 1,044 seconds
Downloaded: 959 bytes
Closing connection
Connection closed
= END OF LOG =.

Transport: BIS - B (POST plug)
Result: failure
Answer: 405
Length: 1204
URL: socket: / /www.google.ca:80; deviceside = false; ConnectionType = m * Pei * li *
Journal:

Connecting to a socket: / /www.google.ca:80; * only given to the RIM ISV partners.
Opening connection...
Open connection
Definition of the properties of application...
Envoy POST request:
"POST / HTTP/1.1".
Host: www.google.ca
Content-Length: 1500
Content-Type: application/octet-stream
User-Agent: Mozilla/4.0
Connection: close

"
Display of 1 500 bytes...
Posted 1 500 bytes
Downloading content...
Download time: 2,041 seconds
Downloaded: 1204 bytes
Closing connection
Connection closed
= END OF LOG =.

Transport: WAP (HTTP GET)
Result: failure
Answer:-1
Length:-1
URL: Not available url
Journal:

Ignored test: no WAP do not service records found.
Ignored test: coverage WAP is not available
Ignored test: Please provide IP and APN WAP

Transport: WAP (Socket GET)
Result: failure
Answer:-1
Length:-1
URL: Not available url
Journal:

Ignored test: no WAP do not service records found.
Ignored test: coverage WAP is not available
Ignored test: Please provide IP and APN WAP

Transport: WAP (HTTP POST)
Result: failure
Answer:-1
Length:-1
URL: Not available url
Journal:

Ignored test: no WAP do not service records found.
Ignored test: coverage WAP is not available
Ignored test: Please provide IP and APN WAP

Transport: WAP (POST plug)
Result: failure
Answer:-1
Length:-1
URL: Not available url
Journal:

Ignored test: no WAP do not service records found.
Ignored test: coverage WAP is not available
Ignored test: Please provide IP and APN WAP

Transport: WAP2 (HTTP GET)
Result: failure
Answer:-1
Length:-1
URL: http://www.google.ca:80 /; deviceside = true; ConnectionUID = WAP2 trans
Journal:

Connection http://www.google.ca:80 /; deviceside = true; ConnectionUID = WAP2 trans
Opening connection...
Error: net.rim.device.internal.io.CriticalIOException: failed criticism tunnel
= END OF LOG =.

Transport: WAP2 (socket GET)
Result: failure
Answer:-1
Length:-1
URL: socket: / /www.google.ca:80; deviceside = true; ConnectionUID = WAP2 trans
Journal:

Connecting to a socket: / /www.google.ca:80; deviceside = true; ConnectionUID = WAP2 trans
Opening connection...
Error: net.rim.device.internal.io.CriticalIOException: failed criticism tunnel
= END OF LOG =.

Transport: WAP2 (HTTP POST)
Result: failure
Answer:-1
Length:-1
URL: http://www.google.ca:80 /; deviceside = true; ConnectionUID = WAP2 trans
Journal:

Connection http://www.google.ca:80 /; deviceside = true; ConnectionUID = WAP2 trans
Opening connection...
Error: net.rim.device.internal.io.CriticalIOException: failed criticism tunnel
= END OF LOG =.

Transport: WAP2 (POST plug)
Result: failure
Answer:-1
Length:-1
URL: socket: / /www.google.ca:80; deviceside = true; ConnectionUID = WAP2 trans
Journal:

Connecting to a socket: / /www.google.ca:80; deviceside = true; ConnectionUID = WAP2 trans
Opening connection...
Error: net.rim.device.internal.io.CriticalIOException: failed criticism tunnel
= END OF LOG =.

Transport: WiFi (HTTP GET)
Result: failure
Answer:-1
Length:-1
URL: Not available url
Journal:

Ignored test: WiFi coverage is not available

Transport: WiFi (Socket GET)
Result: failure
Answer:-1
Length:-1
URL: Not available url
Journal:

Ignored test: WiFi coverage is not available

Transport: WiFi (HTTP POST)
Result: failure
Answer:-1
Length:-1
URL: Not available url
Journal:

Ignored test: WiFi coverage is not available

Transport: WiFi (POST plug)
Result: failure
Answer:-1
Length:-1
URL: Not available url
Journal:

Ignored test: WiFi coverage is not available

Thank you peter and jovinz

I think I have problem in httpconnectionfactory with several url parameter, as peter says

so now I have usr post url as the code below

   public static void CheckConnection()
    {
        HttpConnection hc=null;
        try
        {
            //Wifi Connection
            if ( (WLANInfo.getWLANState() == WLANInfo.WLAN_STATE_CONNECTED) && RadioInfo.areWAFsSupported(RadioInfo.WAF_WLAN))
            {
                ConstantData.postURL=";interface=wifi";
                return;
            }
            //for BES or MDS Connection
            if(CoverageInfo.isCoverageSufficient(CoverageInfo.COVERAGE_MDS))
            {
                boolean connectionFlag=false;
                String post_url;

                //for BES Connections
                post_url="";
                try
                {
                    hc = (HttpConnection) Connector.open("http://www.rim.com"+post_url,Connector.READ_WRITE);
                    if(hc.getResponseCode()==HttpConnection.HTTP_OK)
                    {
                        connectionFlag=true;
                        ConstantData.postURL=post_url;
                        return;
                    }
                    if(hc!=null)
                        hc.close();
                }
                catch (Exception e)
                {
                    System.out.println(e.toString());
                    connectionFlag=false;
                }
                //for MDS Connection
                if(!connectionFlag)
                {
                    try
                    {
                        post_url = ";deviceside=false";
                        hc = (HttpConnection) Connector.open("http://www.rim.com"+post_url);
                        if(hc.getResponseCode()==HttpConnection.HTTP_OK)
                        {
                            ConstantData.postURL=post_url;
                            return;
                        }
                        if(hc!=null)
                            hc.close();
                    }
                    catch (Exception e)
                    {
                        System.out.println(e.toString());
                    }
                }
            }
            //for BIS Connection
            if(CoverageInfo.isCoverageSufficient(CoverageInfo.COVERAGE_BIS_B))
            {
                //BIS Connection
                String post_url = ";deviceside=false;ConnectionType=m**-pu***c";
                try
                {
                    hc = (HttpConnection) Connector.open("http://www.rim.com"+post_url);//Connector.READ_WRITE
                    if(hc.getResponseCode()==HttpConnection.HTTP_OK)
                    {
                        ConstantData.postURL=post_url;
                        return;
                    }
                    if(hc!=null)
                        hc.close();
                }
                catch (Exception e)
                {
                    System.out.println(e.toString());
                }
            }
            //for WAP Connection
            if(CoverageInfo.isCoverageSufficient(CoverageInfo.COVERAGE_DIRECT))
            {               //for WAP Connection
                String post_url = null;
                ServiceBook sb = ServiceBook.getSB();
                ServiceRecord[] records = sb.findRecordsByCid("WPTCP");
                String uid = null;
                boolean connectionFlag=false;
                for(int i=0; i < records.length; i++)
                {
                    if (records[i].isValid() && !records[i].isDisabled())
                    {
                        if (records[i].getUid() != null && records[i].getUid().length() != 0)
                        {
                            if ((records[i].getUid().toLowerCase().indexOf("wifi") == -1) &&
                                    (records[i].getUid().toLowerCase().indexOf("mms") == -1))
                            {
                                uid = records[i].getUid();
                                break;
                            }
                        }
                    }
                }
                if (uid != null)
                {
                    post_url= ";deviceside=true;ConnectionUID=" + uid;
                }
                try
                {
                    hc = (HttpConnection) Connector.open("http://www.rim.com"+post_url);
                    if(hc.getResponseCode()==HttpConnection.HTTP_OK)
                    {
                        connectionFlag=true;
                        ConstantData.postURL=post_url;
                        return;
                    }
                    if(hc!=null)
                        hc.close();
                }
                catch (Exception e)
                {               System.out.println(e.toString());
                connectionFlag=false;
                }
                if(!connectionFlag)
                {
                    post_url=";deviceside=true;apn=blackberry.net";
                    try
                    {
                        hc = (HttpConnection) Connector.open("http://www.rim.com"+post_url);
                        if(hc.getResponseCode()==HttpConnection.HTTP_OK)
                        {
                            ConstantData.postURL=post_url;
                            return;
                        }
                        if(hc!=null)
                            hc.close();
                    }
                    catch (Exception e)
                    {
                        System.out.println(e.toString());
                    }
                }}
        }
        catch (Exception e)
        {

            e.printStackTrace();
        }
        finally
        {
            try
            {
                if(hc!=null)
                    hc.close();
            } catch (IOException e) {
                System.out.println(e.toString());
                e.printStackTrace();
            }
        }

    }

so now its works on WAP2, BIS and the WIFi works fine

the first issue of priority celluler TCP post code is also more WAP2 then

Thus, each transport time select TCP when BIS, WIFI not presend and need for apn

in any case, once again, thank you Peter and demo tools network dignostic is awasome...

Tags: BlackBerry Developers

Similar Questions

  • Get error "this application does not work without Google play services"...!

    Hello

    I use google maps in my application and be able to install the apk from file in the BB device. But after installation when launching the application, I get an error "this application does not work without Google play services.

    How can I get google game services to the BlackBerry device.

    Kind regards

    NGO.

    The BlackBerry Runtime for Android applications does not support Google Maps (or Google Services play). If your application uses Google Maps, there are two ways that you can support mapping in your application. One option is to replace the library card theGoogle with a WebView that integrates the web version of Google Maps.

    For more information on this process, see using a WebView to view Google Maps.

    Another option is to replace Google Maps with OpenStreetMap, which is a free card all over the world.

    For more information on this process, see Replace Google Maps with OpenStreetMap.

  • BlackBerry GPS App Z30 maps does not work without wifi

    Hi there maps GPS app for BB does not work without wifi?

    Very well. Good. Wanted to make sure that you guessed it sorted.

  • Satellite A110-153: Wlan does not work - disabled WiFi connection

    I bought a Toshiba A110-153

    · Via a cable to the router (lan) internet working properly.
    · But doen't work wireless. A few observations:
    · The wireless led burns and is connected.
    · In network connections, I got the message wireless network connection disabled. When I choose 'activate', an attempt is made but after a few did minutes no message and still disabled.
    · At the start of the pc, I see some wireless networks. After awhile they disappaer.
    · some buttons related on wireless are very slow (minutes) to respond.
    · I can click on undernet right icon network; It takes minutes before there is a reaction (a popup), but I can't click on it and it doesn't go away when I'm doing other things.
    · I don't see an additional icon for a wireless card (is thereonly a?

    How can I analyze what is the problem / how to solve?

    Hello

    I agree with snipe. Visit the Intel download page and install the latest version of the driver that there are listed.
    http://www.Intel.com/support/wireless/WLAN/pro3945abg/index.htm

  • ADF application does not work.

    Hello

    I create an application of ADF using Jdeveloper 11 g. It works very well if it is running on the default server.
    I have create a weblogic domain in weblogic 11g. Then I deploy this application in this area. The deployment is successful.
    However, the application does not work. After the login page, it shows a blank page and stop there.

    I paste the error in the log.

    avax.faces.FacesException: oracle.adf.controller.ControllerException: ADFC-10001
    oracle.jbo.DMLException: Houston-26061
    java.sql.SQLException: ORA-01005: password null; connection refused

    Check step 23 here:
    http://radalcove.com/blog/?p=34

  • How can I cancel a subscription and get a refund? An application does not work, the "assistance of the developer page" link provided by itunes is broken.

    How can I cancel a subscription and get a refund?

    An application does not work, the "assistance of the developer page" link provided by itunes is broken, and email provided by the application developer's sole means of support, but no response in 3 weeks to multiple addresses.

    The page you posted has since how to stop an auto-renewal subscription to renew again (see, change, or cancel your subscription - Apple Support).

    To contact iTunes support try http://reportaproblem.apple.co or https://www.apple.com/emea/support/itunes/contact.html

  • ATL-TAB within the APPLICATION does not work

    I'm a convert from windows and love the mac but Alt - Tab within the application does not work - very annoying. I often have multiple windows in the same application, and if the only way to go is to use 4 fingers Mission control, it's terrible because Mission control lists all windows in a small size and pain to know that you want to go. While with alt - tab, I can quickly cycle or just go to the last which is often I want to go to.

    It is one of the major issues Mac usability for me.

    Any tips? or addons?

    Thank you.

    Cmd -'

    Curiously, this document has the wrong shortcut. Keyboard shortcuts in Mac - Apple Support

    They have to move to the next application window is to go to the previous application window.

  • Integration of keyboard shortcut does not work without supervision on T450

    We received some new T450 for our company and I'm putting the shortcut keyboard on it integration tool but it does not work without supervision. I can install it manually with the command-> setup.exe/S/b/m/h, but I need to do for 400 machines with a deployment tool, and here I am stuck.

    I use the latest version of 5.51.001. It works very well for the T540p and more but is not visible for T450.

    Just to be clear, it installs successfully on T450 but does not work, if I push the buttons on the keyboard.

    OK, nevermind guys. I had to do a restart and everything worked.

  • Y560 does not work without power

    I have Lenovo a laptop Y560. Couple of months there is overheating and I after that I started to get the message to "consider replacing the battery. Laptop still worked with AC power or without power (although the time of a battery has been reduced).

    After a few weeks, I bought the battery replacement and laptop worked fine for a while but now it does not work without AC power. Battery is 98% charged, but as soon as I disconnect laptop AC adapter just turns off. What could be the problem?

    Paul,

    replacing the battery is maybe defective, if still under warranty, please contact the vendor that you bought.

    A new true Y560 battery is available on Lenovo online store...

    http://shop.Lenovo.com/SEUILibrary/controller/e/Web/LenovoPortal/en_US/catalog.workflow:item.detail?...

    Cheaper Y560 batteries (good and bad) are also available on eBay and Amazon...

    http://www.eBay.com/Sch/i.html?_trksid=p5197.M570.L1313&_nkw=Lenovo+Y560+battery&_sacat=0&_FROM=R40

    http://www.Amazon.com/s/ref=nb_sb_noss_1?URL=search-alias%3Daps&field-keywords=IdeaPad+Y560+battery&...

    Zehn

  • the host catalyst application does not work

    the host catalyst application does not work

    Could be malicious. See this thread.

  • Mouse and multimedia keys does not work without the fn key

    Lenovo G500

    model without 20236

    Windows 7 sp1

    the mouse and the multimedia keys does not work without the fn key. Help, please

    [Original title: Lenovo g 500]

    Hello

    Check with Lenovo support, their drivers and documentation online and ask for their
    Forums about known problems.

    Support from Lenovo and downloads
    http://www-307.IBM.com/PC/support/site.WSS/homeLenovo.do

    Lenovo forums
    http://forums.Lenovo.com/ I hope this helps.
    --------------------------------------------------------------------------------------------
    Rob Brown - Microsoft MVP<- profile="" -="" windows="" experience :="" bicycle="" -="" mark="" twain="" said="" it="">

  • my webcam application does not work on my windows 7. It has suddenly stopped working. I tried to install the drivers of webcam from the websites of toshiba, to no avail.

    my webcam application does not work on my windows 7. It has suddenly stopped working. I tried to install the drivers of webcam from the websites of toshiba. but after downloading the drivers, when I run the winrar files, he said inexecutionable. Please help.also when I run the compatibility of the test program, it says the webcam application or incompatible, even if it worked very well earlier.

    See the help/support site Tosh or their forums.

    Have you recently updated of your drivers from somwhere system other than Tosh site or installed any new programs or perform any maintenance operation.

    Program compatibility test cannot be invoked

  • Application does not work correctly when I press a CommanButton

    Hi all, I'm having a problem with weblogic 10.3.5.

    It turns out that an application created with JDeveloper 11.1.5, I have test and all is well in that the JDeveloper integrated Weblogic.

    But when to deploy on a stand-alone 10.3.5 weblogic server, the application does not work correctly when I press a CommanButton to go to another search page (the 'action' property is properly set), but nothing happens, remains in the same home page. Similarly when a link of commanButton to run a workflow, it does not work, however in the integrated JDeveloper to Weblogic it works correctly.

    How can I solve these problems?
    Thank you.

    One thing you shouldn't do is add '.jspx' to your URL. This shows the page, but does not start the life cycle of faces that show not work button not working navigation.
    Use

     http://:7001/myApp/faces/index
    

    And it should work.

    Timo

  • iPhone 6 and some applications do not work without an internet connection

    If I'm not connected to WiFi, a number of applications will not work.  Error message says "no internet connection found.  Please sign in to continue. "Is there a work around?

    You have a cellular data connection good in time?

  • 'A 2fa' blackBerry smartphones application does not work on Priv

    The Playstore Google has an application name "2FA One" by 2FA Inc. that will generate the OTP tokens for multi-factor authentication. The problem is that Priv do not set up the application to make it work. Steps to reproduce:

    1. launch the application (it will give you a screen "Thank you for installing..").

    2. press to continue.

    3. Enter the URL of the server to which you will connect.

    4. press to continue. This step WILL NOT WORK for me.

    If you enter an incorrect URL in step 3, it will give you an error that it cannot find the server. If you enter the right pair, it will allow you to enter a PIN for security access. The problem is that the "Continue" button does not work. I was wondering if it's just me or all privileges.

    The app works on my LG phone. I tried it on the default built Priv AT & T, and the AAE599 build without success.

    After the Marshmallow, the application now works.

Maybe you are looking for

  • iTunes does not recognize my ipod since last update 12.3.2.35.

    I recently upgraded to El Capitan 10.11.3 and updated iTunes to 12.3.2.35.  Now iTunes doesn't recognize my ipod Nano 4th generation.  What should do? Thank you.

  • Y510P Windows 8.1 Raster Image

    I'm having this problem too, but Im having a more serious problem. Today, I installed the windows 8.1 (realease version, the windows store), and although my screen resolution is 1920 x 1080, the image sucks! It seens much pixilated and less sharpness

  • system32\hal.dll. missing. computer will not start. Help, please. I don't have an xp cd. XP is installed on the hard drive

    HelloMy laptop is not at all start. It is just coming up with the error message "windows root>\system32\hal.dll. missing. Please reinstall a copy of the above file.Everything I can find on the web so far tells me to reinstall via an XP CD. My version

  • JVM and Module not found error

    Hello. When I run my application, as soon as the Load Simulator shows JVM error 104 ClassCastException, and then tap home screen to eception exception Java.lang.ClassCastException. If I open my application I get JVM error 104 but saying RuntimeExcept

  • How to monitor events in an application

    If I am to monitor a specific application (for user interface events), by adding the code source to watch them without having to edit existing files, which way should I start with. Currently, I read on the signals and slots, applications without a he