在本地运行是没有问题,部署到服务器就报错了,求大神


当前问题共有如下(1)个解决方案
- cwuguzsq终于找到解决办法了 ,我们来看下面的内容吧ItemDAOImpl.javapublic class ItemDAOImpl extends HibernateDaoSupport implements ItemDAO {public List queryAll() throws Exception {// TODO Auto-generated method stubSession session=super.getSession(true);String hql="from Item as i";List l=super.getSession().createQuery(hql).list();return l;}}/其实上面的代码隐藏了一个问题,数据库连接并没有被关闭,所以一直出现以上的问题。