Solved

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

Posted on 2004-10-04
11
1,720 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
 

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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

705 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now