type Exception reportmessage description The server encountered an internal error () that prevented it from fulfilling this request.exception javax.servlet.ServletException: Servlet execution threw an exception
root cause java.lang.OutOfMemoryError: Java heap space
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.15 logs.

解决方案 »

  1.   

    这是我报的错..我用到了Hibernate框架程序是越跑越慢最后就报上面的错误.难道是我的程序有错吗?请解约过这个问题的大虾指教下.
      

  2.   

    我遇到过这种情况.记得最后关闭session.
      

  3.   

    public boolean add(Object object)
    {
    Configuration config = new Configuration().configure();
    SessionFactory sf = config.buildSessionFactory();
    Session session = sf.openSession();
    Transaction tx = session.beginTransaction();
    try
    {
    session.save(object);
    tx.commit();
    session.close();
    return true;
    } catch (HibernateException e)
    {
    e.printStackTrace();
    tx.rollback();
    return false;
    }
    }
      

  4.   

    这是一段添加一条数据的代码,
    session我关闭了的呀.
    可能要在finally里面去关闭吧
    但是我程序执行的时候没有出错呀
    session.close()应该被执行吧