You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Fady <fa...@legsem.com> on 2007/09/08 12:40:43 UTC
AccessControlException on 127.0.01 when using Mina in an Applet
Hello
Using Mina 1.1.2 from an Applet, trying to connect to a remote server
(192.168.0.6 port 1139) from which the Applet originates. I get the
following exception:
Caused by: java.security.AccessControlException: access denied
(java.net.SocketPermission [0:0:0:0:0:0:0:1]:1025 connect,resolve)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkConnect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at
org.apache.mina.transport.socket.nio.SocketSessionConfigImpl.initializeDefaultSocketParameters(SocketSessionConfigImpl.java:144)
at
org.apache.mina.transport.socket.nio.SocketSessionConfigImpl.<clinit>(SocketSessionConfigImpl.java:77)
... 15 more
As you can see the access is denied for address 0 port 1025 which is not the
IP address I am trying to connect to.
Looking into the SocketSessionConfigImpl code, it seems this is a
consequence of a series of attempts to connect locally in
initializeDefaultSocketParameters().
In Mina 1.1.0, there was no attempts to connect locally and my applet worked
fine.
Has anyone else run into a similar issue? Any workarounds?
Thanks for your help.
Fady
--
View this message in context: http://www.nabble.com/AccessControlException-on-127.0.01-when-using-Mina-in-an-Applet-tf4405512s16868.html#a12568499
Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.
Re: AccessControlException on 127.0.01 when using Mina in an Applet
Posted by Fady <fa...@legsem.com>.
Hello Trustin,
Yes, your patch fixes the problem.
Thank you very much for your speedy reply.
Fady
--
View this message in context: http://www.nabble.com/AccessControlException-on-127.0.01-when-using-Mina-in-an-Applet-tf4405512s16868.html#a12654872
Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.
Re: AccessControlException on 127.0.01 when using Mina in an Applet
Posted by Trustin Lee <tr...@gmail.com>.
On 9/8/07, Fady <fa...@legsem.com> wrote:
>
> Hello
>
> Using Mina 1.1.2 from an Applet, trying to connect to a remote server
> (192.168.0.6 port 1139) from which the Applet originates. I get the
> following exception:
>
> Caused by: java.security.AccessControlException: access denied
> (java.net.SocketPermission [0:0:0:0:0:0:0:1]:1025 connect,resolve)
> at java.security.AccessControlContext.checkPermission(Unknown Source)
> at java.security.AccessController.checkPermission(Unknown Source)
> at java.lang.SecurityManager.checkPermission(Unknown Source)
> at java.lang.SecurityManager.checkConnect(Unknown Source)
> at java.net.Socket.connect(Unknown Source)
> at
> org.apache.mina.transport.socket.nio.SocketSessionConfigImpl.initializeDefaultSocketParameters(SocketSessionConfigImpl.java:144)
> at
> org.apache.mina.transport.socket.nio.SocketSessionConfigImpl.<clinit>(SocketSessionConfigImpl.java:77)
> ... 15 more
>
> As you can see the access is denied for address 0 port 1025 which is not the
> IP address I am trying to connect to.
>
> Looking into the SocketSessionConfigImpl code, it seems this is a
> consequence of a series of attempts to connect locally in
> initializeDefaultSocketParameters().
>
> In Mina 1.1.0, there was no attempts to connect locally and my applet worked
> fine.
>
> Has anyone else run into a similar issue? Any workarounds?
>
> Thanks for your help.
The problem has been fixed:
https://issues.apache.org/jira/browse/DIRMINA-437
Please confirm it's really fixed on your applet using the following JAR file:
http://tinyurl.com/3e5gdb
HTH,
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6