title: Critical Tunnel failure exception. How to solve this
body: <p>I wrote the below code to send location coordinates to server:</p>
  
  <pre><code>setTitle("version 5.0");
      Criteria criteria = new Criteria();
      criteria.setHorizontalAccuracy(Criteria.NO_REQUIREMENT);
      criteria.setVerticalAccuracy(Criteria.NO_REQUIREMENT);
      criteria.setCostAllowed(true);
      criteria.setPreferredPowerConsumption(Criteria.POWER_USAGE_LOW);
  
     // bc.setFailoverMode(GPSInfo.GPS_MODE_ssCDMA_MS_ASSIST, 2, 100);
      try {
          LocationProvider lp=LocationProvider.getInstance(criteria);
          if(lp !=null)
          {
          Location loc=null;
      //  while(loc==null)
      //  {   
              loc=lp.getLocation(-1);
      //  }
          if(loc!=null){
              add(new EditField(loc.getQualifiedCoordinates().getLatitude()+"\n"+loc.getQualifiedCoordinates().getLongitude(),""));
          }
          else 
              add(new EditField("unable to find the location provider", ""));
          }
          else
          {
          add(new EditField("unable to find the location provider", ""));
          }
      } catch (LocationException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      } catch (Exception e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      }
      ButtonField b = new ButtonField("Send");
      add(b);
      b.setChangeListener(new FieldChangeListener() {
  
          public void fieldChanged(Field field, int context) {
              // TODO Auto-generated method stub
              try{
                  String url="http://56.91.532.72:8084/SFTS/updateLocation.jsp?empid=12304&amp;lat=16.9477&amp;lon=82.23970;deviceside=true";
                  Dialog.alert(url);
                  ConnectionFactory factory = new ConnectionFactory();
  
                   // use the factory to get a connection
                   ConnectionDescriptor conDescriptor = factory.getConnection(url, TransportInfo.TRANSPORT_TCP_CELLULAR,null);
  
  
                   if ( conDescriptor != null ) {
                      HttpConnection  conn = (HttpConnection) conDescriptor.getConnection();  
                      Dialog.alert("http");
                      //conn.setRequestMethod(HttpConnection.GET);
                      Dialog.alert("conn.setre");
                      int responseCode = conn.getResponseCode();
                      Dialog.alert(Integer.toString(responseCode));
                      if(responseCode == HttpConnection.HTTP_OK)
                      {
                          Dialog.alert("OK");
                          InputStream data = conn.openInputStream();
                          StringBuffer raw = new StringBuffer();
                          byte[] buf = new byte[4096];
                          int nRead = data.read(buf);
                          while(nRead &gt; 0)
                          {
                              raw.append(new String(buf, 0, nRead));
                              nRead = data.read(buf);
                          }
  
                      }
                  }
              }catch(Exception e){
                      Dialog.alert(e.getMessage());
                  }
          }
      }); 
  </code></pre>
  
  <p>I am getting an exception Critical tunnel failure. But i am able to retrieve the location coordinates correctly. I am using blackberry 8520 with airtel sim which is enabled with data services. Actually this app worked well in the mobile with version 5.0. But it's not working in the mobile which i've upgraded from 4.6.1.3 to 5.0.0 what might be the problem? Please provide me a solution. thank you</p>
  
  <p>I also tried the below url's:</p>
  
  <ol>
  <li><a href="http://56.91.532.72:8084/SFTS/updateLocation.jsp?empid=12304&amp;lat=16.9477&amp;lon=82.23970;deviceside=true;apn=null" rel="nofollow">http://56.91.532.72:8084/SFTS/updateLocation.jsp?empid=12304&amp;lat=16.9477&amp;lon=82.23970;deviceside=true;apn=null</a></li>
  <li><a href="http://56.91.532.72:8084/SFTS/updateLocation.jsp?empid=12304&amp;lat=16.9477&amp;lon=82.23970;deviceside=true;apn=airtelgprs.com" rel="nofollow">http://56.91.532.72:8084/SFTS/updateLocation.jsp?empid=12304&amp;lat=16.9477&amp;lon=82.23970;deviceside=true;apn=airtelgprs.com</a></li>
  </ol>
  
  <p>I also enabled apn settings in my mobile</p>