Solved

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

Posted on 2004-10-04
11
1,767 Views
Last Modified: 2008-01-09
Hi,

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(StreamRemoteCall.java:247)
        at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
        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.

0
Comment
Question by:anonp
  • 4
  • 3
  • 2
  • +1
11 Comments
 
LVL 35

Expert Comment

by:girionis
ID: 12215997
0
 
LVL 35

Expert Comment

by:girionis
ID: 12216000
0
 
LVL 12

Expert Comment

by:Giant2
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.
0
Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

 

Author Comment

by:anonp
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.

0
 
LVL 12

Expert Comment

by:Giant2
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).
0
 

Author Comment

by:anonp
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.

Thanks.
0
 
LVL 35

Expert Comment

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

Expert Comment

by:girionis
ID: 12256675
Fine by me.
0
 
LVL 12

Expert Comment

by:Giant2
ID: 12256686
even by me.
0
 

Accepted Solution

by:
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
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

821 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