gordon_guan
asked on
rmi: access denied (java.net.SocketPermission
I met a rmi access denied exception. server works well, just that when client try to connect to server, we got this problem. exception as follows:
access denied (java.net.SocketPermission 155.69.149.78:10000 connect,resolve)
java.security.AccessContro lException : access denied (java.net.SocketPermission 155.69.149.78:10000 connect,resolve)
at java.security.AccessContro lContext.c heckPermis sion(Unkno wn Source)
at java.security.AccessContro ller.check Permission (Unknown Source)
at java.lang.SecurityManager. checkPermi ssion(Unkn own Source)
at java.lang.SecurityManager. checkConne ct(Unknown Source)
at java.net.Socket.<init>(Unk nown Source)
at java.net.Socket.<init>(Unk nown Source)
at sun.rmi.transport.proxy.RM IDirectSoc ketFactory .createSoc ket(Unknow n Source)
at sun.rmi.transport.proxy.RM IMasterSoc ketFactory .createSoc ket(Unknow n Source)
at sun.rmi.transport.tcp.TCPE ndpoint.ne wSocket(Un known Source)
at sun.rmi.transport.tcp.TCPC hannel.cre ateConnect ion(Unknow n Source)
at sun.rmi.transport.tcp.TCPC hannel.new Connection (Unknown Source)
at sun.rmi.server.UnicastRef. newCall(Un known Source)
at sun.rmi.registry.RegistryI mpl_Stub.l ookup(Unkn own Source)
at java.rmi.Naming.lookup(Unk nown Source)
at MathExplorer1$panelPlot.pa int(MathEx plorer1.ja va:343)
at java.awt.GraphicsCallback$ PaintCallb ack.run(Un known Source)
at sun.awt.SunGraphicsCallbac k.runOneCo mponent(Un known Source)
at sun.awt.SunGraphicsCallbac k.runCompo nents(Unkn own Source)
at java.awt.Container.paint(U nknown Source)
at sun.awt.RepaintArea.paint( Unknown Source)
at sun.awt.windows.WComponent Peer.handl eEvent(Unk nown Source)
at java.awt.Component.dispatc hEventImpl (Unknown Source)
at java.awt.Container.dispatc hEventImpl (Unknown Source)
at java.awt.Component.dispatc hEvent(Unk nown Source)
at java.awt.EventQueue.dispat chEvent(Un known Source)
at java.awt.EventDispatchThre ad.pumpOne EventForHi erarchy(Un known Source)
at java.awt.EventDispatchThre ad.pumpEve ntsForHier archy(Unkn own Source)
at java.awt.EventDispatchThre ad.pumpEve nts(Unknow n Source)
at java.awt.EventDispatchThre ad.run(Unk nown Source)
access denied (java.net.SocketPermission
java.security.AccessContro
at java.security.AccessContro
at java.security.AccessContro
at java.lang.SecurityManager.
at java.lang.SecurityManager.
at java.net.Socket.<init>(Unk
at java.net.Socket.<init>(Unk
at sun.rmi.transport.proxy.RM
at sun.rmi.transport.proxy.RM
at sun.rmi.transport.tcp.TCPE
at sun.rmi.transport.tcp.TCPC
at sun.rmi.transport.tcp.TCPC
at sun.rmi.server.UnicastRef.
at sun.rmi.registry.RegistryI
at java.rmi.Naming.lookup(Unk
at MathExplorer1$panelPlot.pa
at java.awt.GraphicsCallback$
at sun.awt.SunGraphicsCallbac
at sun.awt.SunGraphicsCallbac
at java.awt.Container.paint(U
at sun.awt.RepaintArea.paint(
at sun.awt.windows.WComponent
at java.awt.Component.dispatc
at java.awt.Container.dispatc
at java.awt.Component.dispatc
at java.awt.EventQueue.dispat
at java.awt.EventDispatchThre
at java.awt.EventDispatchThre
at java.awt.EventDispatchThre
at java.awt.EventDispatchThre
Are you using applet?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
well, I have solved(hope so) it myself, I just don't use the bat file to run the RMI server program and just run the rmiregistry and java command in two different windows and then it does give me no exception. But haven't tested with client program, so not sure whether can work with client correctly or not.
But any way, I think maggri does put in effort, so thanks a lot
But any way, I think maggri does put in effort, so thanks a lot