• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

IOException while trying to connect using ssl

 
Krishna Chaitanya
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I got the following exception while trying to connect to a remote server using ssl, Could anybody tell me why and when do these kind of exceptions arise.

I'm establishing a connection in the following manner

String url ="ssl://210.210.13.115:8251";
System.out.println("before connecting to ssl");
StreamConnection socket = (StreamConnection)Connector.open
(url,Connector.READ_WRITE,true);
System.out.println("after connecting to ssl");

I got the following exception message

java.io.IOException: Bad record type (97) or version (97.97)
at com.sun.midp.ssl.Record.rdRec(+284)
at com.sun.midp.ssl.Record.rdRec(+5)
at com.sun.midp.ssl.Handshake.getNextMsg(+17)
at com.sun.midp.ssl.Handshake.rcvSrvrHello(+5)
at com.sun.midp.ssl.Handshake.doHandShake(+29)
at com.sun.midp.ssl.SSLStreamConnection.<init>(+157)
at com.sun.midp.io.j2me.ssl.Protocol.openPrim(+249)
at javax.microedition.io.Connector.openPrim(+299)
at javax.microedition.io.Connector.open(+15)
at UtilityServices.connectSSL(+28)
at UtilityServices.run(+12)
 
Theodore Casser
Ranch Hand
Posts: 1902
Hibernate Netbeans IDE PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I originally started leaving a post about the fact that I get a different exception when I run your code, until I looked at the exception again. It looks like it might be something having to do with the actual connection... Have you tested the connection through other means to make sure it's returning what you think it should be?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic