首页上一页 1 下一页尾页 5 条记录 1/1页
JSP网络在线考试系统
发表在JavaWeb图书答疑
2015-03-20
是否精华
是
否
版块置顶:
是
否
[font color=#FF0000]点击进入后台后[/font]
{
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: java.lang.NullPointerException
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:523)
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:1194)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
java.lang.NullPointerException
com.wgh.core.ConnDB.executeQuery(ConnDB.java:58)
com.wgh.dao.ManagerDAO.checkManager(ManagerDAO.java:15)
com.wgh.action.Manager.managerLogin(Manager.java:44)
com.wgh.action.Manager.execute(Manager.java:22)
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:1194)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
}
[font color=#FF0000]tomcat提示:[/font][/font]
{
com.microsoft.sqlserver.jdbc.SQLServerException:到主机的TCP/IP连接失败。java.net.ConnectException:Connection timed out:connect
......
警告:DbConnectionManager.getConnectiong<>获得数据库连接失败。
警告:unhandled exception thrown:class java.lang.nullpointerexception
链接类型:com.microsoft.sqlserver.jdbc.SQLServerDriver
链接位置:jdbc:sqlerver://192.168.1.199:1433;DatabaseName=db_netExam
用户/密码/sa/[font color=#00FF00]111[/font]
三月...org.apache.struts.action.RequestProcessor processException
警告:Unhandled Exception thrown:class java.lang.NullPointerException
}
我已经将[font color=#FF0000]connDB.properties[/font]改为:
{
DB_CLASS_NAME=com.microsoft.sqlserver.jdbc.SQLServerDriver
DB_URL=jdbc:sqlserver://localhost:1433;DatabaseName=db_netExam
DB_USER=sa
DB_PWD=[font color=#00FF00]123[/font]
}
将[font color=#FF0000]ConnDB.java[/font]改为:
{
......
private static String dbUrl = "jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=db_netExam";
private static String dbUser = "sa";
private static String dbPwd = "[font color=#00FF00]123[/font]";
......
}
[font color=#FF0000]为什么还是出现错误?怎么处理?(我用的是SQLServer 2005。我的电脑上还装了一个MYSQL,和这个有关么?如果有关怎么处理?)谢谢老师。[/font]
{
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: java.lang.NullPointerException
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:523)
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:1194)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
java.lang.NullPointerException
com.wgh.core.ConnDB.executeQuery(ConnDB.java:58)
com.wgh.dao.ManagerDAO.checkManager(ManagerDAO.java:15)
com.wgh.action.Manager.managerLogin(Manager.java:44)
com.wgh.action.Manager.execute(Manager.java:22)
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:1194)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
}
[font color=#FF0000]tomcat提示:[/font][/font]
{
com.microsoft.sqlserver.jdbc.SQLServerException:到主机的TCP/IP连接失败。java.net.ConnectException:Connection timed out:connect
......
警告:DbConnectionManager.getConnectiong<>获得数据库连接失败。
警告:unhandled exception thrown:class java.lang.nullpointerexception
链接类型:com.microsoft.sqlserver.jdbc.SQLServerDriver
链接位置:jdbc:sqlerver://192.168.1.199:1433;DatabaseName=db_netExam
用户/密码/sa/[font color=#00FF00]111[/font]
三月...org.apache.struts.action.RequestProcessor processException
警告:Unhandled Exception thrown:class java.lang.NullPointerException
}
我已经将[font color=#FF0000]connDB.properties[/font]改为:
{
DB_CLASS_NAME=com.microsoft.sqlserver.jdbc.SQLServerDriver
DB_URL=jdbc:sqlserver://localhost:1433;DatabaseName=db_netExam
DB_USER=sa
DB_PWD=[font color=#00FF00]123[/font]
}
将[font color=#FF0000]ConnDB.java[/font]改为:
{
......
private static String dbUrl = "jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=db_netExam";
private static String dbUser = "sa";
private static String dbPwd = "[font color=#00FF00]123[/font]";
......
}
[font color=#FF0000]为什么还是出现错误?怎么处理?(我用的是SQLServer 2005。我的电脑上还装了一个MYSQL,和这个有关么?如果有关怎么处理?)谢谢老师。[/font]