首页上一页 1 下一页尾页 1 条记录 1/1页
《JSP项目全程实录》第3章为什么不能用SQL2008连接
发表在JavaWeb图书答疑
2009-06-04
是否精华
是
否
版块置顶:
是
否
《JSP项目全程实录》中第3章‘电子商城’对SQL的要求很苛刻,仅仅能与SQLSP3数据库连接,我分别试过SQLSP1,SQLSP2,SQLSP3,SQLSP4,SQL2005,SQL2008。这是为什么呢?希望各位有识之士帮忙分析分析!我第一次使用JSP就遇见这个问题,真的很头疼!不知道以上电子商城的源代码要如何处理才能在XP+Tomcat6.0+SQL2008+JDK1.6环境下正常运行?
错误信息就是关于数据库连接的HTTP Status 500 -错误!在SQLSP3之外的SQL版本都是这个错误!改装SQLSP3后一切正常!个人觉得这个配置倒不如ASP!也看过很多人发的关于这个错误的解决方案,其实都没用!这里面就是数据库连接的问题!而且SQL2005不支持空密码。
显示错误信息如下:
HTTP Status 500 -
--------------------------------------------------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: java.lang.NullPointerException
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
java.lang.NullPointerException
com.wy.dao.GoodsDao.selectMark(GoodsDao.java:52)
org.apache.jsp.index_jsp._jspService(index_jsp.java:70)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs.
--------------------------------------------------------------------------------
Apache Tomcat/6.0.18
错误信息就是关于数据库连接的HTTP Status 500 -错误!在SQLSP3之外的SQL版本都是这个错误!改装SQLSP3后一切正常!个人觉得这个配置倒不如ASP!也看过很多人发的关于这个错误的解决方案,其实都没用!这里面就是数据库连接的问题!而且SQL2005不支持空密码。
显示错误信息如下:
HTTP Status 500 -
--------------------------------------------------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: java.lang.NullPointerException
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
java.lang.NullPointerException
com.wy.dao.GoodsDao.selectMark(GoodsDao.java:52)
org.apache.jsp.index_jsp._jspService(index_jsp.java:70)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs.
--------------------------------------------------------------------------------
Apache Tomcat/6.0.18