import org.apache.commons.dbutils.handlers.BeanListHandler;这个包,BeanListHandler让我发现List<Friend> list = (List<Friend>) runner.query(sql, new BeanHandler<Friend>(Friend.class),username);里的new BeanHandler<Friend>(Friend.class)是错误的,应该:new BeanListHandler<Friend>(Friend.class)
javabean.Friend cannot be cast to java.util.List