Can anyone help me......
When i want to update one record in this entity bean, this error occurred
java.rmi.ServerException: null
Embedded Exception
A CMP field that is a member of the primary key can only be set in ejbCreate [EJB 2.0 Spec. 10.3.5].; nested exception is:
javax.ejb.EJBException: null
This is the way i used in my program to update the record:
PK pk = new PK();
pk.setBin(iBin);
pk.setCardNum(iCardnum);
pk.setTrdAcctno(sOldTrdAcctno);
pk.setPreferredName(sOldPreferredName);
......
.....
Reg3rdAcc = home.findByPrimaryKey(pk);
Reg3rdAcc.setTrdAcctno(sTrdAcctno);
pk.setTrdAcctno(sTrdAcctno);
Reg3rdAcc = home.findByPrimaryKey(pk);
Reg3rdAcc.setPreferredName(sPreferredName);
Did you read that section of the spec? You are trying to change the value of a primary key, which is not allowed outside of ejbCreate.