Sunday, August 9, 2009

EJB Run time exception (at javax.rmi.CORBA.Util.wrapException)


[1/24/08 14:53:51:609 SGT] 00000028 SystemErr R java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.MarshalException: Exception occurred in server thread; nested exception is:
java.io.NotSerializableException
[1/24/08 14:53:51:625 SGT] 00000028 SystemErr R at com.ibm.CORBA.iiop.UtilDelegateImpl.wrapException(UtilDelegateImpl.java:696)
[1/24/08 14:53:51:625 SGT] 00000028 SystemErr R at javax.rmi.CORBA.Util.wrapException(Util.java:296)
[1/24/08 14:53:51:625 SGT] 00000028 SystemErr R at com.sit.app.ejb.ccf.ctltbl._CCCtlTbl_Stub.getBizNatCode(_CCCtlTbl_Stub.java:681)
[1/24/08 14:53:51:625 SGT] 00000028 SystemErr R at com.sit.app.ccf.ctltbl.actions.CCBizNatCodeAction.getBizNatCodeList(CCBizNatCodeAction.java:60)


Cause:
Here the getBizNatCodeList() method in Action class returns an ArrayList of Java Object. In my case , this java bean has not serialized. so by making the bean serialize using 'implements Serializable', we can avoid this error.

Solution:

public class CCBank implements Serializable{



public String getXXX(){};

public void setXXX(){};
.............
..............
.............

}

No comments:

Post a Comment