eclipse+myeclipse+tomcat问题

05-12-10 ashyrabbit
环境eclipse3.1.1
myeclipse4.03
tomcat5

按照myeclipse的flash demo:Hibernate.swf和源程序BasicDB.zip一步一步进行操作,数据库换成ms sql server结果出现如下错误:

javax.servlet.ServletException: org.hibernate.HibernateException: Not able to obtain connection
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:545)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:486)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)


root cause

java.lang.RuntimeException: org.hibernate.HibernateException: Not able to obtain connection
com.pengcheng.hibernate.VipService.addVipdata(VipService.java:264)
com.pengcheng.struts.action.AddVipdata.execute(AddVipdata.java:47)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)


哪位大哥帮忙分析一下,谢谢了!

banq
2005-12-11 14:17
Not able to obtain connection

表示你的数据库DataSource没有配置好,和程序代码无关。