System.err.println(e); System.exit(1);
throw new RuntimeException(e);
  protected static boolean groupDelete(GrouperSession s, GrouperGroup g) {    boolean rv = false;    /*     * TODO I envision problems when people start creating group types     *      with other custom fields...     */    // Does the group have members?    List members = g.listVals(s);    // Is the group a member?    Subject       asSubj  = GrouperSubject.load(g.id(), "group");    GrouperMember asMem   = GrouperMember.load(asSubj);    List memberOf = asMem.listVals(s);    if ( (members.size() != 0) || (memberOf.size() != 0) ) {      if (members.size() != 0) {        Grouper.log().event(          "ERROR: Unable to delete group as it still has members"        );      }      if (memberOf.size() != 0) {        Grouper.log().event(          "ERROR: Unable to delete group as it is a member of other groups"        );      }      return rv;    }    Session session = GrouperBackend._init();    try {      Transaction t = session.beginTransaction();      // Revoke all privileges      Grouper.access().revoke(s, g, "ADMIN");      Grouper.access().revoke(s, g, "OPTIN");      Grouper.access().revoke(s, g, "OPTOUT");      Grouper.access().revoke(s, g, "READ");      Grouper.access().revoke(s, g, "UPDATE");      Grouper.access().revoke(s, g, "VIEW");      Grouper.naming().revoke(s, g, Grouper.PRIV_CREATE);      Grouper.naming().revoke(s, g, Grouper.PRIV_STEM);      /*       * FIXME Remove effected memberships created by this group.       *       Although, will the above take care of this for me?       */            // Remove attributes      Iterator attrIter = GBQuery.kv(                            session, "GrouperAttribute",                            "groupKey", g.key()                          ).iterator();      while (attrIter.hasNext()) {        GrouperAttribute ga = (GrouperAttribute) attrIter.next();        session.delete(ga);      }                      // Remove schema      Iterator schemaIter = GBQuery.kv(                              session, "GrouperSchema",                              "groupKey", g.key()                            ).iterator();      while (schemaIter.hasNext()) {        GrouperSchema gs = (GrouperSchema) schemaIter.next();        session.delete(gs);      }      // Remove group      session.delete(g);      // Commit      t.commit();      rv = true;    } catch (HibernateException e) {      // TODO We probably need a rollback in here in case of failure      //      above.      System.err.println(e);      System.exit(1);    }    GrouperBackend._hibernateSessionClose(session);    return rv;  }