在MyEclipse中引用hibernate3.1的库包时会出现getCurrentSession().getTransaction()无法使用,是因为版本的问题导致的,只要更新一下版本就可以解决这个问题。