Discussion Board

Results 1 to 8 of 8

Threaded View

  1. #1
    Registered User
    Join Date
    Oct 2013

    [moved] https problem when connecting to https://m.vk.com

    I'm writing the application for Nokia Asha 501 that uses VKontakte API. There is a strange exception when connection to https://m.vk.com is opening (see below). It occurs both on device and on emulator. Default browser opens this page well. There are also no any problems when url is http://m.vk.com or https://www.google.ru.
    I spend a lot of time to find the solution out and without any results.
    I really don't know what I'm doing wrong. Please help.
    try {
    	final String url = "https://m.vk.com";//"https://www.google.ru";
    	final HttpConnection connection = (HttpConnection) Connector.open(url);
    	System.out.println(connection.getResponseCode()); // <- Exception is thrown
    	final InputStream connStream = connection.openInputStream();
    	final byte[] buffer = new byte[1024];
    	final ByteArrayOutputStream dataStream = new ByteArrayOutputStream();
    	while (connStream.read(buffer) > 0) {
    } catch (IOException e) {
    [DISPLAY] Warning: setPureTouch is disabled!
    no localization file: locale/locale.res. Load localization manually.
    Warning: Traffic View: Listing of TCP/UDP Sent traffic is set to off (see Monitor)
    Warning: Traffic View: Listing of TCP/UDP Received traffic is set to off (see Monitor)
    java.io.IOException: Alert (2,40)type:22
     - com.sun.midp.ssl.RecordReader.rdRec(), bci=224
     - com.sun.midp.ssl.Handshake.getNextMsg(), bci=10
     - com.sun.midp.ssl.Handshake.rcvSrvrHello(), bci=2
     - com.sun.midp.ssl.Handshake.doHandShake(), bci=25
     - com.sun.midp.ssl.SSLStreamConnection.<init>(), bci=163
     - com.sun.midp.io.j2me.https.Protocol.connect(), bci=245
     - com.sun.midp.io.j2me.http.Protocol.streamConnect(), bci=53
     - com.sun.midp.io.j2me.http.Protocol.startRequest(), bci=7
     - com.sun.midp.io.j2me.http.Protocol.sendRequest(), bci=33
     - com.sun.midp.io.j2me.http.Protocol.sendRequest(), bci=3
     - com.sun.midp.io.j2me.http.Protocol.getResponseCode(), bci=5
     - com.mycompany.vkontakte.Application.startApp(Application.java:41)
     - javax.microedition.midlet.MIDletTunnelImpl.callStartApp(), bci=1
     - com.sun.midp.midlet.MIDletPeer.startApp(), bci=4
     - com.sun.midp.midlet.MIDletStateHandler.startSuite(), bci=269
     - com.sun.midp.main.AbstractMIDletSuiteLoader.startSuite(), bci=38
     - com.sun.midp.main.CldcMIDletSuiteLoader.startSuite(), bci=5
     - com.sun.midp.main.AbstractMIDletSuiteLoader.runMIDletSuite(), bci=151
     - com.sun.midp.main.AppIsolateMIDletSuiteLoader.main(), bci=26
    Last edited by Marvel84; 2013-11-08 at 12:18.

Similar Threads

  1. Midlet crashes on N95 while connecting to an Https server
    By ysoubigo in forum Mobile Java Networking & Messaging & Security
    Replies: 4
    Last Post: 2011-03-21, 14:53
  2. Series 40 6h ed SDK: Slow when connecting with HTTPS
    By pmuilu in forum Mobile Java Tools & SDKs
    Replies: 5
    Last Post: 2010-07-10, 19:33
  3. Https request problem whith PAMP. Is https/SSL supported?
    By yakimov in forum Mobile Web Server
    Replies: 0
    Last Post: 2010-01-24, 11:31
  4. [moved] HTTPS on Symbian 2nd edition
    By manupeco in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2009-11-27, 14:15
  5. J2ME Security : MIDP HTTPS vs Browser HTTPS
    By dhamodharan in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2005-09-11, 14:19

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts