[jboss-user] [EJB 3.0] - Bidirectional Relationship MarshalException on EJB3 Client

octaviob do-not-reply at jboss.com
Sun Jul 22 12:31:48 EDT 2007


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: 
  | 	java.lang.NullPointerException
  | 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;
  | }
  | 
  | @ManyToOne(fetch=FetchType.EAGER)
  | @JoinColumn(name = "supervisor")
  | public Employee getSupervisor(){
  | 	return supervisor;
  | }
  | 

Any suggestions/guidance will be greatly appreciated...

Octavio

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4066478#4066478

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4066478



More information about the jboss-user mailing list