Hi Matt,

It's a JDK bug IMHO looking from the stack trace.  KQueue NIO
implementation should ignore the security exception when it's not
accessible.

HTH,

Matt Kimmel wrote:
> Thanks for the suggestion!  It's true, and I have thought about it.
> However, it does seem like something somewhere must be wrong if I can't
> open an NIO socket to the host that served up the applet without
> triggering a security exception.  I'm wondering if I've misconfigured
> something.
> 
> Thanks,
> -Matt
> 
> Sangjin Lee wrote:
>> You might want to consider signing your applet which will grant more
>> permissions...
>>
>> Regards,
>> Sangjin
>>
>>
>> On Thu, Apr 17, 2008 at 1:40 PM, Matt Kimmel
>> <[EMAIL PROTECTED]>
>> wrote:
>>
>>> Hey all,
>>>
>>> I'm working on a client/server application in which the client is an
>>> applet.  I've integrated both client and server to use MINA for their
>>> communications, and they work fine when I run the applet in
>>> appletviewer.
>>>  However, when I run the applet in a web page in Firefox, I get the
>>> following exception in the Java Console window:
>>>
>>> java.lang.ExceptionInInitializerError
>>>        at
>>> sun.nio.ch.KQueueSelectorImpl.<init>(KQueueSelectorImpl.java:51)
>>>        at
>>> sun.nio.ch.KQueueSelectorProvider.openSelector(KQueueSelectorProvider.java:20)
>>>
>>>        at java.nio.channels.Selector.open(Selector.java:209)
>>>        at
>>> org.apache.mina.transport.socket.nio.SocketConnector.startupWorker(SocketConnector.java:233)
>>>
>>>        at
>>> org.apache.mina.transport.socket.nio.SocketConnector.connect(SocketConnector.java:195)
>>>
>>>        at
>>> org.apache.mina.transport.socket.nio.SocketConnector.connect(SocketConnector.java:137)
>>>
>>>        at
>>> org.apache.mina.common.support.BaseIoConnector.connect(BaseIoConnector.java:40)
>>>
>>>        at com.esc.client.MinaClient.connect(MinaClient.java:94)
>>>        at com.esc.client.SpaceClient.<init>(SpaceClient.java:100)
>>>        at
>>> com.esc.viewer.applet.ViewerApplet.start(ViewerApplet.java:152)
>>>        at sun.applet.AppletPanel.run(AppletPanel.java:420)
>>>        at jep.AppletFramePanel.run(AppletFramePanel.java:176)
>>>        at java.lang.Thread.run(Thread.java:613)
>>> Caused by: java.security.AccessControlException: access denied
>>> (java.util.PropertyPermission sun.arch.data.model read)
>>>        at
>>> java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
>>>
>>>        at
>>> java.security.AccessController.checkPermission(AccessController.java:427)
>>>
>>>        at
>>> java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
>>>        at
>>> java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1285)
>>>        at java.lang.System.getProperty(System.java:628)
>>>        at
>>> sun.nio.ch.KQueueArrayWrapper.<clinit>(KQueueArrayWrapper.java:67)
>>>        ... 13 more
>>>
>>> It looks like there's a security issue with something deep in NIO trying
>>> to use System.getProperty, but I haven't been able to figure how to
>>> fix it
>>> or avoid it.  Has anyone seen this before?  Does anyone have any
>>> suggestions?  FWIW, my dev environment is Mac OS X 10.5.2, Firefox
>>> 2.0.0.14, Apple's JDK 5, and both client and server running on the same
>>> machine.
>>>
>>> Thanks!
>>> -Matt
>>> -- 
>>> Matt Kimmel, Software Alchemist
>>> The Electric Sheep Company, Inc.
>>> [EMAIL PROTECTED]
>>> Second Life: Feep Larsson
>>>
>>>
>>
> 

-- 
Trustin Lee - Principal Software Engineer, JBoss, Red Hat
--
what we call human nature is actually human habit
--
http://gleamynode.net/

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to