• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RMI problem

 
Jeff Bergan
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Been really frustrated with the following problem. Help would be really appreciated.
In local mode it works fine.
In remote mode it appears to successfully export from the server and the client seems to find it. When the combo box info comes over I get the following error
Corba Unkown Exception 0 Maybe; nested exception is: org.omg.CORBA.portable.UnknownException: minor code: 0 completed Maybe (this shows up on my display)
On the server the trace says
Exception in thread "Thread-3" org.omg.CORBA.BAD_PARAM: minor code: 1398079494 completed: Maybe
at com.sun.corba.se.internal.javax.rmi.CORBA.Util.Utility.throwNotSerializableForCorba(Unknown Source)
com.sun.corba.se.internal.iiop.CDRoutputStream.write_abstractObject(Unkown Source)
com.suncorba.se.internal.io.IIOPOutputStream.writeObjectDelegate(Unknown Source)
com.sun.corba.se.internal.io.IIOPOutputStream.writeOBjectOverride(Unknown Source)
java.io.ObjectOutputStream.writeObject(Unkown Source)
java.util.TreeSet.writeObject(Unknown Source)
Any guidance would be much appreciated
Jeff
PS I am using a Treeset. (which seems to be serializable) but from all the Unkown Source that shows up on the dos screen maybe it is not finding the remote class correctly even though it gets that far?
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What the heck is a TreeSet and why is Corba there? I think you might be going way beyond what is needed for the assignment.
Mark
 
Kalichar Rangantittu
Ranch Hand
Posts: 240
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Whoa this is a first. Try using HashSet..
 
Suchak Jani
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gentlemen,
I am using the TreeSet collection type for the origin and destination String values used for the combobox.
The reson is that it gives me a Sorted Set and so it seems convinient.
Comments??
Regards
Suchak Jani
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Doesn't a combobox take an array?
I don't think I sorted the values, and I got 24/24 on the GUI. Well at least I didn't have any code to specifically sort the data. And I only used arrays to fill the combobox.
Try HashSet if you want to stay with the collections classes. Just my opinion too.
Mark
 
Suchak Jani
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Doesn't a combobox take an array?
Yes it does. So when you have the TreeSet which implements the Collection interface i have done the following.
Collection c = new TreeSet();
//populate c with destinations and origins
String [] destinationsandorigins = new String[c.size()];
c.toArray(destinationsandorigins);
Thus one get's a sorted array.
I could remove this code if it is not advisable to do it this way.
Regards
Suchak Jani
 
Jeff Bergan
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Treeset is good for sorting. I am just using RMI IIOP so that is why I have the corba message. Just a slighly differently implementation.
Found my problem. In the Treeset I was using my own defined comparator. Not realizing that the comparator itself also had to be serializable to go over the net. I guess I keeps some kind of record that goes over the network?
 
Jeff Bergan
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I will look into the Hash Set to see if I should use that. But now that it works I dont want to change. It is kind of cool using something different.
I think Treeset is sort of a replacement for Vector if you don't care that the information will not by synchronized. So it is faster.
Thanks for the comments.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic