首页上一页 1 下一页尾页 1 条记录 1/1页
jsp项目开发案例全程实录第二版 第10章 博客网
发表在JavaWeb图书答疑
2011-02-15
是否精华
是
否
版块置顶:
是
否
第10章博客网站,我的系统是XP,sqlserver2000,安装了数据库sp4补丁,用的jar包是msbase.jar,msutil.jar,mssqlserver.jar,jspSmartUpload.jar;
当登陆博客网,出现下面的错误,发现类似的问题已经有几个了,我再问一遍,希望能解决得了。
HTTP Status 500 -
--------------------------------------------------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
java.lang.NullPointerException
com.wy.tool.JDBConnection.executeQuery(JDBConnection.java:52)
com.wy.dao.ConsumerDao.getConsumerForm(ConsumerDao.java:98)
com.wy.webiter.ConsumerServlet.checkConsumer(ConsumerServlet.java:169)
com.wy.webiter.ConsumerServlet.doGet(ConsumerServlet.java:16)
com.wy.webiter.ConsumerServlet.doPost(ConsumerServlet.java:186)
javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
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.29 logs.
--------------------------------------------------------------------------------
Apache Tomcat/6.0.29
另外我发现JDBCconnection.java 代码中有如下代码
public class JDBConnection {
private final String url = "jdbc:sqlserver://192.168.1.199:1433;DatabaseName=db_BlodMay";
private final String userName = "sa";
private final String password = "111";
private Connection con = null;
和视频中说的密码为空和localhost不一致!我把192.168.1.199也改成了localhost,密码也改成为空了,跟安装的数据库的密码匹配了的。谢谢。
当登陆博客网,出现下面的错误,发现类似的问题已经有几个了,我再问一遍,希望能解决得了。
HTTP Status 500 -
--------------------------------------------------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
java.lang.NullPointerException
com.wy.tool.JDBConnection.executeQuery(JDBConnection.java:52)
com.wy.dao.ConsumerDao.getConsumerForm(ConsumerDao.java:98)
com.wy.webiter.ConsumerServlet.checkConsumer(ConsumerServlet.java:169)
com.wy.webiter.ConsumerServlet.doGet(ConsumerServlet.java:16)
com.wy.webiter.ConsumerServlet.doPost(ConsumerServlet.java:186)
javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
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.29 logs.
--------------------------------------------------------------------------------
Apache Tomcat/6.0.29
另外我发现JDBCconnection.java 代码中有如下代码
public class JDBConnection {
private final String url = "jdbc:sqlserver://192.168.1.199:1433;DatabaseName=db_BlodMay";
private final String userName = "sa";
private final String password = "111";
private Connection con = null;
和视频中说的密码为空和localhost不一致!我把192.168.1.199也改成了localhost,密码也改成为空了,跟安装的数据库的密码匹配了的。谢谢。