Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Help! with RMIRegistry

Thread Tools

Help! with RMIRegistry

David Kensche
Posts: n/a
I desperately need help with the RMIRegistry.
I run an application which makes use of this
registry (JADE agent development platform).
I tried this on two systems one of which works
fine. The other one always made problems if
JADE was not properly closed. In this case
Jade could not deregister with the registry.
For the case when this happened I wrote a little
application which erases the registry:

public class RMIC {
private static final String LOG_CONF_DIR =
private static final String LOG_CONF_FILE = "";
private static Logger logger = Logger.getLogger(RMIC.class);

public static void main(String[] args) {
// Configure log4j.
if(System.getSecurityManager() == null)
System.setSecurityManager(new RMISecurityManager());
logger.debug("SecurityManager set.");
String rmiURL = "rmi://localhost";
String[] names = null;
try {
names = Naming.list(rmiURL);
} catch(MalformedURLException e) {
logger.fatal("Malformed URL:" + rmiURL, e);
} catch(RemoteException e) {
logger.fatal("Error in lower layers.", e);
for(String name : names) {
System.out.println("Degistering name:" + name);
try {
} catch(MalformedURLException e) {
logger.fatal("Malformed URL:" + rmiURL, e);
} catch(RemoteException e) {
logger.fatal("Error in lower layers.", e);
} catch(NotBoundException e) {
logger.fatal("Name not bound:" + name, e);

This solved my problem for some days. But now
the RMIRegistry seems to not be available anymore
and I don't know much about it. The following exception
is thrown:

java.rmi.NoSuchObjectException: no such object in table
sun.rmi.transport.StreamRemoteCall.exceptionReceiv edFromServer(Unknow
n Source)
at sun.rmi.transport.StreamRemoteCall.executeCall(Unk nown Source)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at sun.rmi.registry.RegistryImpl_Stub.list(Unknown Source)
at java.rmi.Naming.list(Unknown Source)
at org.rwth.i5.rmic.RMIC.main(
Exception in thread "main" java.lang.NullPointerException
at org.rwth.i5.rmic.RMIC.main(

BTW I have to JDK 1.4 and 1.5 installed. May this cause
the problem?

Please can anybody help?

Thanks beforehand,
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
rmiregistry woes jonck Java 6 01-24-2005 12:37 AM
Monitoring the rmiregistry silarri Java 3 01-04-2005 12:51 PM
RMI without the rmiregistry JP Martin Java 1 10-06-2004 07:33 AM
Running Rmiregistry as service, problem on logofff. Arun Goel Java 0 11-12-2003 06:41 PM
RMI with rmiregistry on remote host Rob Dempster Java 1 10-08-2003 04:18 PM