strut+hibernate+tomcat数据池配置问题

luisfigook
07-04-23 2 175

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Cannot open connection
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:514)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1192)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:412)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root cause

org.hibernate.exception.GenericJDBCException: Cannot open connection
org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:91)
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:79)
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:314)
org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:114)
org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:137)
org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:57)
org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1208)
cn.com.shoppingonline.DbOperate.getSorts(DbOperate.java:122)
cn.com.shoppingonline.FirstAction.execute(FirstAction.java:23)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1192)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:412)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


note The full stack trace of the root cause is available in the Apache Tomcat/5.5.16 logs.

哪位大侠帮我看看啊,多谢!

banq
2007-05-08 10:18

>Cannot open connection
数据库不能连接,检查用户名和密码 以及端口是否屏蔽等等.

leoyu
2007-05-08 11:10

配置代码帖出来看看