刚学,还不太懂,
这是我EJB里自动产生的public class LineinfoPK
    implements Serializable {
  public String substaid;
  public String lineid;
  public LineinfoPK() {
  }  public LineinfoPK(String substaid, String lineid) {
    this.substaid = substaid;
    this.lineid = lineid;
  }  public boolean equals(Object obj) {
    if (this == obj)
      return true;
    if (! (obj instanceof LineinfoPK))
      return false;
    LineinfoPK that = (LineinfoPK) obj;
    if (! (that.substaid == null ? this.substaid == null :
           that.substaid.equals(this.substaid)))
      return false;
    if (! (that.lineid == null ? this.lineid == null :
           that.lineid.equals(this.lineid)))
      return false;
    return true;
  }  public int hashCode() {
    int result = 17;
    result = 37 * result + this.substaid.hashCode();
    result = 37 * result + this.lineid.hashCode();
    return result;
  }
}

解决方案 »

  1.   

    这是调用的地方, 在下面这句话中有错
      LineinfoRemote ejb = Lineinfohome.findByPrimaryKey(pk);  public int deleteLineinfo(String substaid, String lineid) {
        int back = -1;
        LineinfoPK pk=new LineinfoPK(substaid,lineid);
        LineinfoRemote ejb = Lineinfohome.findByPrimaryKey(pk);
        return 0;
      }
      

  2.   

    搞定,忘加try 块 了全当散分了