×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Regular Contributor
    Join Date
    Jan 2006
    Posts
    90

    ConnectionNotFoundException

    Hi ,

    I have a strange problem. I'm getting ConnectionNotFoundException in J2ME code, whereas when i tried to open the url from browser it's opening that page. It's giving problem with only one url. I checked server side also. I couldn't find anything wrong in server side also. Will it cause any conflict with particular port number or so? Any suggestions welcome !

    Jini

  2. #2
    Nokia Developer Champion
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,192

    Re: ConnectionNotFoundException

    Untrusted MIDlets cannot open a socket connection to ports 80, 8080, or 443. Are you using a SocketConnection?
    If not, what's the URL you are using?

    Hartti

  3. #3
    Regular Contributor
    Join Date
    Jul 2004
    Posts
    56

    Re: ConnectionNotFoundException

    Test on emulator or real devide?

    Do you specify correct GPRS profile for the java application?

  4. #4
    Regular Contributor
    Join Date
    Jan 2006
    Posts
    90

    Re: ConnectionNotFoundException

    Hi

    I'm using trusted midlet only. And i'm testing it in emulator. Not in phone. I'm opening the url using HttpConnection and the port number of the url is 8090 (url is like http://ipaddress:8090/test/test1?user="1"&pwd="2"). Will it cause any problem? And the server i'm using have 2 ips. One is public ip and other is internal ip? I'm trying to connect to internal ip address.

    Jini
    Last edited by jini_1; 2007-05-30 at 05:16.

  5. #5
    Nokia Developer Champion
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,192

    Re: ConnectionNotFoundException

    There seems to a number of "-characters in the URL. Have you tried without them?

    Hartti

  6. #6
    Registered User
    Join Date
    Dec 2005
    Location
    Brazil
    Posts
    1,884

    Re: ConnectionNotFoundException

    Hi Jini,

    Let me try to help. First of all I think your request parameters do not need to include "" such as pwd="2" but it will not make any difference anyway. It is just a matter of preparing the connection string the right way.

    "And the server i'm using have 2 ips. One is public ip and other is internal ip? I'm trying to connect to internal ip address."
    If I understood it right it is where the problem lies. You have an internal (maybe physical address) and one public (virtual) address. You must target the public (virtual?) one otherwise you will not get connected.

    Hope this helps
    Juarez Alvares Barbosa Junior - Brazil

  7. #7
    Regular Contributor
    Join Date
    May 2003
    Posts
    151

    Re: ConnectionNotFoundException

    Quote Originally Posted by jini_1
    the url is 8090 (url is like http://ipaddress:8090/test/test1?user="1"&pwd="2"). Will it cause any problem?
    That is not a valid url - it contains illegal characters, namely the quotes.

    When you put it into a browser on a PC the browser is intelligent enough to change it to:

    http://ipaddress:8090/test/test1?use...22&pwd=%222%22

    The phone probably won't be able to do this for you.

    btw you shouldn't need any quote anyway http://ipaddress:8090/test/test1?user=1&pwd=2 would be fine.

Similar Threads

  1. Is it possible transfer data using IR port?
    By arqbispo2 in forum Mobile Java General
    Replies: 18
    Last Post: 2011-07-31, 11:56
  2. ConnectionNotFoundException SIP
    By amonts in forum Mobile Java Networking & Messaging & Security
    Replies: 2
    Last Post: 2006-05-08, 12:50
  3. ConnectionNotFoundException for HTTP
    By simon_turner in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2005-10-31, 12:47
  4. ConnectionNotFoundException
    By jorgenaasland in forum Mobile Java General
    Replies: 1
    Last Post: 2002-11-21, 07:11

Posting Permissions

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