• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.lang.SecurityException: Target port denied to untrusted applications

 
Krishna Chaitanya
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm developing a j2me application to access a web-application residing on the remote server for the purpose i have to use socket's to establish a client - server communication. While doing so i get the following exception

java.lang.SecurityException: Target port denied to untrusted applications

I'm connecting tothe server using the following syntax:

SocketConnection sc = (SocketConnection)Connector.open("socket://localhost:8080");

I request to kindly provide me a solution and help me resolving the issue.
It is very urgent.

Thanks
Kumar
 
Olga Flasza
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am also facing the same problem.. Did you ever get solution to this problem??

Please help...

Thanks
 
anthony karter
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What phone are you trying to do it ?

some of the phone you must sign the application before open the socket.

( need to add in the jad the right permission + sign the application )
 
Olga Flasza
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I haven't tried any phone yet.
I tried to run the MIDlet both from NetBeans IDE and JWTK. Ther server is running on my pc i.e localhost.
If you find any solution please post it here that will be helpful. Thanks
 
anthony karter
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Try to add permissions to the emulator

wtk --> prefeneces --> security --> change the security domain to manufactor

 
Olga Flasza
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi anthony, Thanks for your help. It just worked! I changed the security domain to 'trusted'. But I was wondering how to do that in NetBeans IDE 6.8??

Cheers!
 
Gopinath Karyadath
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mashruf Zaman

In netbeans 6.8 , Project Properties -> Running->Specify the security Domain -> Select manufacturer.


Regards
 
Olga Flasza
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks I got it..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic