HTTP Status 500 - --------------------------------------------------------------------------------type Exception reportmessage description The server encountered an internal error () that prevented it from fulfilling this request.exception org.apache.jasper.JasperException: Cannot open connection
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:372)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause org.hibernate.exception.JDBCConnectionException: Cannot open connection
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:74)
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:426)
org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:119)
org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:57)
org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1326)
com.formBean.TbHibernateDao.selectManager(TbHibernateDao.java:32)
org.apache.jsp.index_jsp._jspService(index_jsp.java:56)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.
--------------------------------------------------------------------------------Apache Tomcat/5.0.28这是什么错误 怎么改呀?
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:372)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause org.hibernate.exception.JDBCConnectionException: Cannot open connection
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:74)
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:426)
org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:119)
org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:57)
org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1326)
com.formBean.TbHibernateDao.selectManager(TbHibernateDao.java:32)
org.apache.jsp.index_jsp._jspService(index_jsp.java:56)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.
--------------------------------------------------------------------------------Apache Tomcat/5.0.28这是什么错误 怎么改呀?
解决方案 »
- 关于java scoket编程
- 大家帮我看看这个错误,或者谁有主意遇到这种错误而且在这种环境下该怎么办?
- Lock obtain timed out: lucene报这个错误是怎么回事?
- 谁能给我发一个JSP的树结构
- struts2.0拦截器问题
- jsp高手们快来看看jsp仿动网论坛!!!!
- 怎么样让超时5分钟的用户的session无效?
- 請問在一個分成上下兩個框架的整個頁面中,上面框架是包含一個form的form.jsp頁面,下面框架則是包含table的另一table.jsp頁面,當按下fo
- js实现滚动加载商品列表,点击商品列表查看某一个商品后返回到原来商品列表位置怎么实现?
- iframe的问题
- 如何解决Web系统单用户登录问题,不是单点登录
- 有关spring配置文件错误
com.formBean.TbHibernateDao.selectManager(TbHibernateDao.java:32) 是什么?数据库链接配置正确不?
<class name="com.formBean.TbUser" table="tb_user" catalog="db_database02">
<id name="name" type="java.lang.String">
<column name="name" length="20" />
<generator class="assigned" />
</id>
<property name="sex" type="java.lang.String">
<column name="sex" length="2" />
</property>
<property name="born" type="java.util.Date">
<column name="born" length="23" />
</property>
<property name="profession" type="java.lang.String">
<column name="profession" length="20" />
</property>
</class>
</hibernate-mapping>
<hibernate-configuration> <session-factory>
<property name="connection.username">sa</property>
<property name="connection.url">jdbc:microsoft:sqlserver://localhost:1433</property>
<property name="dialect">org.hibernate.dialect.SQLServerDialect</property>
<property name="myeclipse.connection.profile">JDBC</property>
<property name="connection.driver_class">com.microsoft.jdbc.sqlserver.SQLServerDriver</property>
<property name="connection.password">sa</property>
<mapping resource="com/formBean/TbUser.hbm.xml" />
</session-factory></hibernate-configuration>
public class TbHibernateDao {
private static SessionFactory sessionFactory=null;
private Session session=null;
Transaction tx = null;
static {
try {
System.out.println("aa");
Configuration config = new Configuration().configure();
System.out.println("bb");
sessionFactory = config.buildSessionFactory();
System.out.println("cc");
} catch (Exception e) {
// System.out.println(e.getMessage());
// e.printStackTrace();
}
}
public List selectManager() {
System.out.println("00");
session = sessionFactory.openSession();
System.out.println("0011");
if(session==null){
System.out.println("null");
}
tx = session.beginTransaction();
System.out.println("11");
String hql = "from TbUser";
List list = null;
try {
System.out.println("22");
Query query = session.createQuery(hql);
System.out.println("33");
list = query.list();
System.out.println("44");
} catch (Exception e) {
e.printStackTrace();
}
tx.commit();
session.close();
return list;
} }
bb
cc
00
0011