RMI + SSL = java.rmi.NoSuchObjectException: no such object in table

Posted on 2004-10-04
Last Modified: 2008-01-09

I have an RMI Application that has been running for about 2 years without any problems.  Now, I need to enhance it by using SSL Sockets as the transport.  I have followed the examples on Sun's website and I have gotten a basic hello world application to work.  However, when I do exactly the same thing to my application, I keep on getting this exception:

java.rmi.NoSuchObjectException: no such object in table
        at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(
        at sun.rmi.transport.StreamRemoteCall.executeCall(
        at sun.rmi.server.UnicastRef.invoke(
        at finance.frontEnd.branchSvr.guiProxy.ClientProxyImp_Stub.login(Unknown Source)

I understand this exception is usually DGC related.  However, I have already make sure each server is referenced by some static variable.  When I remove the SSL code from the application, everything works fine like before.  What am I doing wrong?

Please help.

Question by:anonp
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
  • +1
LVL 35

Expert Comment

ID: 12216000
LVL 12

Expert Comment

ID: 12216353
Be sure you are using the same VM&library on both side (client & server).
Maybe your are invoking a method or class that doesn't exist in one of the 2 sides.

Bye, Giant.
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.


Author Comment

ID: 12217661

Thank you for your comments.  However, they do not seem to apply to my problem.  

Whenever I test, I start both server and client one after the other.  As a result, the stubs and server objects should not be stale or expired.  Moreover, I don't have any problem when I am not using SSL.  Also, for testing, both client and server are run on the same computer.

I have done some more testing, and its like this.  I have one instance of remote-object-A and many instances of remote-object-B.  They share the same SSL Server Socket Factory.  However, A uses port 9090 and instances of B all use port 8080.  When I only have A exported, everything works just like the example.  Everything is fine.  However, when I have instances of B exported too, the exception will happen.

Please help.

LVL 12

Expert Comment

ID: 12224131
Try to change:
you say when A exported everything works, when B exported too, the exception...
try to export only the B instance and see if the exception raise up. If it's so, there is something wrong in B class (I cannot know what because I have not the code you use).

Author Comment

ID: 12233332

OK, I have solved the problem.  It is caused by SSL interfering with DGC.

Bascially, when SSL is not used, DGC behave correctly and the servers are not deleted.  However, when SSL is used, DGC somehow get confused and delete all servers right after they are started.

To solve this problem, I used a static collection to hold a reference to every single server.  This prevent them from getting gabage collected.

The strangest thing is why when where is only one server, this problem does not happen.

Anyway, if no one objects, I will have this question delete and the points refunded.

LVL 35

Expert Comment

ID: 12234902
Better have it PAQ and points refunded.
LVL 35

Expert Comment

ID: 12256675
Fine by me.
LVL 12

Expert Comment

ID: 12256686
even by me.

Accepted Solution

ee_ai_construct earned 0 total points
ID: 12278547
Question answered by asker or dialog valuable.
Closed, 125 points refunded.
ee_ai_construct (replacement part #xm34)
Community Support Admin

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question