Exception in thread "main" java.lang.NullPointerException
[java] at mypack.BusinessService51.findMonkeysByTeam(BusinessService51.java:24) //错误出现场的第一位置
tx = session.beginTransaction();//此处应该是开始了
// //int count; // //List monkeys = new List[count]; Query query = new Query; Query query = session.createQuery("from Monkey as m where m.team.id="+team.getId()); List monkeys = query.list(); System.out.println("query.list()"); // List monkeys=session.createQuery("from Monkey as m where m.team.id="+team.getId()) // .list();修改的过程如上