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

RMI Tutorial, help...

2 views
Skip to first unread message

Darrel Riekhof

unread,
Jul 19, 1997, 3:00:00 AM7/19/97
to

I can't get the rmi tutorial 'hello world" program to work.
The client and server just sit there. Then after a few minutes
the server spits this out at me:
------------------------------------------------------------------------

ServerWarbot error: Server RemoteException; nested exception is:
java.rmi.AccessException: Registry.rebind
java.rmi.ServerException: Server RemoteException; nested exception is:
java.rmi.AccessException: Registry.rebind
------------------------------------------------------------------------

and the client spits this out at me:
------------------------------------------------------------------------

ClientWarbotApplet Exception: WarbotServer
java.rmi.NotBoundException: WarbotServer
Exception occurred during event dispatching:
java.lang.NullPointerException: null string
at sun.awt.windows.WGraphics.drawString(WGraphics.java:190)
at
COM.edgewise.warbot.server.ClientWarbotApplet.paint(ClientWarbotApple
t.java:32)
at java.awt.Component.dispatchEventImpl(Component.java:1412)
at java.awt.Container.dispatchEventImpl(Container.java:837)
at java.awt.Component.dispatchEvent(Component.java:1393)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:63)

Exception occurred during event dispatching:
java.lang.NullPointerException: null string
at sun.awt.windows.WGraphics.drawString(WGraphics.java:190)
at
COM.edgewise.warbot.server.ClientWarbotApplet.paint(ClientWarbotApple
t.java:32)
at java.awt.Component.dispatchEventImpl(Component.java:1412)
at java.awt.Container.dispatchEventImpl(Container.java:837)
at java.awt.Component.dispatchEvent(Component.java:1393)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:63)

------------------------------------------------------------------------

all the while, RegistryImpl just sits there.

I suspect that the following line is causing the problem:

Naming.rebind( "//myhost/HelloServer", obj );

I'm using just the name of the server as the first argument to the
rebind()
method, because I don't know what to put for my host. The docs
say it will default to the local machine as the host. What should I be
putting there?

I'm just trying to get two JVMs on my local machine to communicate.
It's a Win95 machine, I have TCPIP installed. I've noticed that when
I connect to the internet using my modem with the server running, I
get an exception message on my client about my service provider
refusing the connection:
-----------------------------------------------------------------------
ClientWarbotApplet Exception: Connection refused to host:
[primenet.primenet.co
m:1099]; nested exception is:
java.net.ConnectException: Connection refused
java.rmi.ConnectException: Connection refused to host:
[primenet.primenet.com:10
99]; nested exception is:
java.net.ConnectException: Connection refused
at
sun.rmi.transport.tcp.TCPChannel.openSocket(TCPChannel.java:240)
at
sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:125)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:73)
at
sun.rmi.registry.RegistryImpl_Stub.lookup(RegistryImpl_Stub.java:86)
at java.rmi.Naming.lookup(Naming.java:60)
at
COM.edgewise.warbot.server.ClientWarbotApplet.init(ClientWarbotApplet
.java:21)
at sun.applet.AppletPanel.run(AppletPanel.java:287)
at java.lang.Thread.run(Thread.java:474)
Exception occurred during event dispatching:
java.lang.NullPointerException: null string
at sun.awt.windows.WGraphics.drawString(WGraphics.java:190)
at
COM.edgewise.warbot.server.ClientWarbotApplet.paint(ClientWarbotApple
t.java:32)
at java.awt.Component.dispatchEventImpl(Component.java:1412)
at java.awt.Container.dispatchEventImpl(Container.java:837)
at java.awt.Component.dispatchEvent(Component.java:1393)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:63)

-----------------------------------------------------------------------------------

I start RegistryImpl before the server.
I run rmic after each new build of the server.

Can anyone help? What should I put for my host? Do I need to set some
TCPIP settings? Why isn't my Server getting registered???

Darrel


Joel M. Gringorten

unread,
Jul 24, 1997, 3:00:00 AM7/24/97
to

Darrel Riekhof (rie...@primenet.com) wrote:
: I can't get the rmi tutorial 'hello world" program to work.

: The client and server just sit there. Then after a few minutes
: the server spits this out at me:

[...]

: I suspect that the following line is causing the problem:

: Naming.rebind( "//myhost/HelloServer", obj );

Unless your hostname is "myhost", yes this looks rather suspect :-)

: I'm using just the name of the server as the first argument to the


: rebind()
: method, because I don't know what to put for my host. The docs
: say it will default to the local machine as the host. What should I be
: putting there?

The local machine is fine. Although you need to have a web server
running on the machine where the server is running. Somehow I suspect
this isn't the case. Even without running the server, see if you can
browse the URL for the HelloApplet on your machine. If you can't, you
certainly won't be able to utilize the server.

-joel


0 new messages