mina-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Kimmel <ma...@electricsheepcompany.com>
Subject Strange security exception in MINA applet
Date Thu, 17 Apr 2008 20:40:30 GMT
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.
mattk@electricsheepcompany.com
Second Life: Feep Larsson


Mime
View raw message