Problem when starting remote rmiregistry service using ssh

Qiang Wei <[email protected]> Fri, 5 Oct 2007 14:41:23 -0700
Newsgroups gmane.comp.java.sun.rmi
Message-ID <[email protected]>
* Hi all,

I want to start the rmiregistry on a remote server (assuming its IP is
192.168.1.1) by using the following command:



$ ssh 192.168.1.1 "rmiregistry &"



But  I always get the following exceptions:



Exception in thread "main" java.lang.ExceptionInInitializerError

   at java.lang.Class.initializeClass(libgcj.so.7rh)

   at gnu.java.rmi.server.UnicastConnectionManager.getInstance(libgcj.so.7rh
)

   at gnu.java.rmi.server.UnicastServerRef.<init>(libgcj.so.7rh)

   at gnu.java.rmi.registry.RegistryImpl.<init>(libgcj.so.7rh)

   at java.rmi.registry.LocateRegistry.createRegistry(libgcj.so.7rh)

   at java.rmi.registry.LocateRegistry.createRegistry(libgcj.so.7rh)

   at gnu.java.rmi.registry.RegistryImpl.main(libgcj.so.7rh)

Caused by: java.lang.NullPointerException

   at java.net.InetAddress.getHostAddress(libgcj.so.7rh)

   at gnu.java.rmi.server.UnicastConnectionManager.<clinit>(libgcj.so.7rh)

   at java.lang.Class.initializeClass(libgcj.so.7rh)

   ...6 more



However, If I first login the machine using ssh and then run rmiregistry
locally, it starts well.



Anybody know why this happens? Any hint on solving this problem is highly
appreciated.



Best, Sean
*

===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff RMI-USERS".  For general help, send email to
[email protected] and include in the body of the message "help".

For a list of frequently asked RMI questions please refer to:
http://java.sun.com/j2se/1.3/docs/guide/rmi/faq.html

To view past RMI-USERS postings, please see:
http://archives.java.sun.com/archives/rmi-users.html