Solved

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

Posted on 2004-10-04
11
1,749 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
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 

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

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
JavaScript/Java - Changing an image background color 4 67
map related example 6 49
even odd program using while loop 3 43
How to convert String matching to regex in java 4 34
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
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 different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
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.

803 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