Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2004-10-04
11
Medium Priority
?
1,942 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
10 Comments
 
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
The viewer will learn how to implement Singleton Design Pattern in Java.
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.
Suggested Courses

783 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