Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Custom class Serializable Dynamic Class Loading  RSS feed

seshu Palamanti
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a simple custom object like this.

public class TestObject implements Serializable {
private String name;
private String city;
public String getCity() {
return city;
public void setCity(String city) { = city;
public String getName() {
return name;
public void setName(String name) { = name;

I want to send it across the wire through a simple stateless session bean. We are using this session bean as More of a Facade to a caching framework to cache custom user objects who's class will not be there on the server side. So as you might expect i get
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: Failed to load class TestObject
at weblogic.rjvm.ResponseImpl.unmarshalReturn(

How can we solve this problem as i require that we can take in any object on the server side with out the server actually having the class in its path.I was reading about Dynamic Class loading for RMI can this used for this scenario i.e server getting code from codebase from client side.I would really appreciate if some answers this and provide some sample code.


Thanks in advance.
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!