?entity bean问题,高手们帮帮忙!!!(烦啊)
jsyx 2002-03-12 10:20:53 我用的是weblogic6.1。
这是ejbhome中的create()
Account create(String accountID, String ownerName) throws CreateException, RemoteException;
这是bean中的
public AccountPK ejbCreate(String accountID, String ownerName) throws CreateException {
PreparedStatement pstmt = null;
Connection conn = null;
try {
System.out.println("ejbCreate() called.");
this.accountID = accountID;
this.ownerName = ownerName;
this.balance = 0;
pstmt = conn.prepareStatement("insert into scott.accounts (accountID, ownerName, balance) values (?, ?, ?)");
pstmt.setString(1, accountID);
pstmt.setString(2, ownerName);
pstmt.setDouble(3, balance);
pstmt.executeUpdate();
return new AccountPK(accountID);
} catch (Exception e) {
throw new CreateException(e.toString());
} finally {
try { if (pstmt != null) pstmt.close(); }
catch (Exception e) {}
try { if (conn != null) conn.close(); }
catch (Exception e) {}
}
}
我调用的时候总报这个错误,一头雾水,请高手指点!
java.io.InvalidClassException: javax.ejb.EJBException; Local class not compatibl
e: stream classdesc serialVersionUID=-9219910240172116449 local class serialVers
ionUID=796770993296843510