This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I have made a RMI server and client Software that works if the one calls remote methods that have as parameters simple Objects.
More precisely: by simple objects I mean the parameters passed to the remote methods are made of classes where the members are all simple primitive data types.
In my case telt is an instance of the following object:
When there is no ArrayList of otherObj , the tubtel, the rmi invocation works fine! Data is passed correctly and the results are returned ok.
But I always get a unmarshalling error when I pass the above Object to the remote method with the ArrayList of otherObj.
I tested the same call Without the tubtel Arraylist and there was no error ?!
Can someone explain how to make such a remote method invocation when your method parameters have Objcets that contain member that are ArrayList of other Objects ?
Nitesh Kant wrote:It is generally better to TellTheDetails. It will help if you post the exception details here.
Is your "otherObj" serializable?
Do you have the serialized object definitions in the client side or have enabled dynamic class downloading?
You are absolutely right Nitesh, sorry for not showing the log ...
Also sorry as I could not reply yesterday.
Watching the logs showed me exactly the problem: The otherObj was not Serializable indeed !
the logs showed a clear:
For not only otherObj but also some other classes inside my App that where used latter!
I could get it to work easily by making those classes implement Serializable.
I got another error latter because one of Classes I used did implement serializable but I forgot to add a static field with a :
After adding this field I could pass the correct Object with the ArrayList of otherObj as a parameter.