4 Replies Latest reply on Jul 24, 2007 9:20 PM by Octavio

    Bidirectional Relationship MarshalException on EJB3 Client

    Octavio Newbie

      I'm getting a MarshalException on a client application (Eclipse RCP).
      I have a bidirectional relationship Employee-Supervisor, both of the same class.

      My client app can retrieve a Supervisor entity, including the subordinate employees, without a problem. However, if I attempt to retrieve an employee that has a supervisor, I get a MarshalException on the client side:

      java.rmi.MarshalException: Failed to communicate. Problem during marshalling/unmarshalling; nested exception is:
      at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:306)
      at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:143)
      at org.jboss.remoting.Client.invoke(Client.java:525)
      at org.jboss.remoting.Client.invoke(Client.java:488)

      I'm using JBoss 4.0.5.GA. There are no Exceptions on the server side.

      I'm including the code that defines the relationship (I do initialize the subordinate set on the server before sending the entity to the client):

      @OneToMany(mappedBy = "supervisor", fetch=FetchType.LAZY )
      public Set<Employee> getSubordinateSet(){
       return subordinateSet;
      @JoinColumn(name = "supervisor")
      public Employee getSupervisor(){
       return supervisor;

      Any suggestions/guidance will be greatly appreciated...