Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

RMI and Java1.2

0 views
Skip to first unread message

Juan C. Estrada

unread,
Apr 16, 1999, 3:00:00 AM4/16/99
to
I'm trying a simple RMI example on Java1.2 which was origianlly written
for Java1.1 It's a basic remote method call to a "hello" method that
prints out "Hello World". Anyway, I keep on getting this error stack
trace. Anyone have any idea if there's a difference in the RMI package
between 1.2 and 1.1? btw, it works with Java1.1

mystation 10> java -Djava.rmi.server.codebase=file://home/rmi/hello/
hello.HelloImpl

HelloImpl error: access denied (java.net.SocketPermission sun.moon.com
resolve)
java.security.AccessControlException: access denied
(java.net.SocketPermission sun.moon.com resolve)
at java.lang.Throwable.<init>(Throwable.java:78)
at java.lang.Exception.<init>(Exception.java:42)
at java.lang.RuntimeException.<init>(RuntimeException.java:47)
at java.lang.SecurityException.<init>(SecurityException.java:39)

at
java.security.AccessControlException.<init>(AccessControlException.java:57)

at java.security.AccessControlContext.checkPermission(Compiled
Code @ 0x1d3288)
at java.security.AccessController.checkPermission(Compiled Code
@ 0xd6010)
at java.lang.SecurityManager.checkPermission(Compiled Code @
0x1adcf4)
at
java.lang.SecurityManager.checkConnect(SecurityManager.java:795)
at java.net.InetAddress.getAllByName0(Compiled Code @ 0x1d05fc)
at java.net.InetAddress.getAllByName0(InetAddress.java:524)
at java.net.InetAddress.getByName(Compiled Code @ 0x1d06a8)
at java.net.Socket.<init>(Socket.java:90)
at
sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:29)

at
sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Compiled
Code @ 0x261490)
at
sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:479)
at sun.rmi.transport.tcp.TCPChannel.newConnection(Compiled Code
@ 0x257534)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:262)
at
sun.rmi.registry.RegistryImpl_Stub.rebind(RegistryImpl_Stub.java)
at java.rmi.Naming.rebind(Naming.java:108)
at hello.HelloImpl.main(HelloImpl.java:30)

I would be happy to provide the code if needed. Thanks in advance for
any help!
- Juan

Michael Cardon

unread,
Apr 16, 1999, 3:00:00 AM4/16/99
to
Hello Juan,

You need to implement a java security policy on the command line for jdk1.2.
See the following url for an explaination:

http://java.sun.com/docs/books/tutorial/rmi/running.html

Good luck.

Michael Cardon
m...@smartz.com

Juan C. Estrada <jces...@mail.arc.nasa.gov> wrote in message
news:37176187...@mail.arc.nasa.gov...

0 new messages