spring - StackOverflowError while reading then deleting object with hibernate -


i reading objects , deleting , throws java.lang.stackoverflowerror!

public class testdummy extends testcase {      @autowired     private applicationcontext context;      @autowired     private accountdao accountdao;    public void testdeleteaccount(){          account acc = accountdao.get("9be4bfa718ea4b4ee044000077b05a84");         system.out.println("account name "+acc.getaccountname());         accountdao.delete(a);      } 

}

accountdao , context instantiating good.

here get() , delete() methods

   public account get(string id) {     account acc = gethibernatetemplate().get(account.class, id);     return  acc; }  public void delete(account account) {     delete(account); } 

i wonder can recursively happening here!

please advice.

public void delete(account account)  {    delete(account); } 

no wonder so.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -