首页上一页 1 下一页尾页 3 条记录 1/1页
《java项目开发全程实录》第九章通用BBS的问题
发表在JavaWeb图书答疑
2012-04-27
是否精华
是
否
版块置顶:
是
否
还有一星期就要给导师验收了,LZ心急如焚。
下载了光盘,按照视频做的,代码没有出问题,最后就是打开项目时出现错误。
下面是在myeclipse中运行tomcat发布项目的控制台信息,虽然看不懂,但是已经觉得不对了。
2012-4-27 0:15:59 org.apache.catalina.core.AprLifecycleListener init
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\MyEclipse Enterprise Workbench 5.1.0 GA\bin;C:\Program Files\Apache Software Foundation\Tomcat 6.0\bin
2012-4-27 0:16:00 org.apache.coyote.http11.Http11Protocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2012-4-27 0:16:00 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 2222 ms
2012-4-27 0:16:00 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2012-4-27 0:16:00 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.35
2012-4-27 0:16:00 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deploying configuration descriptor manager.xml
2012-4-27 0:16:02 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory bbs
[font color=#FF0000]log4j:WARN No appenders could be found for logger (org.apache.struts.util.PropertyMessageResources).
log4j:WARN Please initialize the log4j system properly.
[/font]2012-4-27 0:16:07 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory docs
2012-4-27 0:16:07 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory ROOT
2012-4-27 0:16:07 org.apache.coyote.http11.Http11Protocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2012-4-27 0:16:07 org.apache.jk.common.ChannelSocket init
信息: JK: ajp13 listening on /0.0.0.0:8009
2012-4-27 0:16:07 org.apache.jk.server.JkMain start
信息: Jk running ID=0 time=0/109 config=null
2012-4-27 0:16:07 org.apache.catalina.startup.Catalina start
信息: Server startup in 7137 ms
最后运行就是如下错误。
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: javax.servlet.ServletException: org.apache.commons.dbcp.DbcpException: java.sql.SQLException: Invalid authorization specification message from server: "Access denied for user 'root'@'localhost' (using password: YES)"
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:502)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:412)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
javax.servlet.ServletException: org.apache.commons.dbcp.DbcpException: java.sql.SQLException: Invalid authorization specification message from server: "Access denied for user 'root'@'localhost' (using password: YES)"
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.doGet(ActionServlet.java:414)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:709)
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:680)
org.apache.jsp.index_jsp._jspService(index_jsp.java:62)
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:388)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
org.apache.commons.dbcp.DbcpException: java.sql.SQLException: Invalid authorization specification message from server: "Access denied for user 'root'@'localhost' (using password: YES)"
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:85)
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:184)
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:722)
org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool.java:117)
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:108)
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:312)
com.wsy.struts.datasource.DB.<init>(DB.java:15)
com.wsy.struts.bean.ForumBean.getRecord(ForumBean.java:95)
com.wsy.struts.action.IndexAction.execute(IndexAction.java:25)
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.doGet(ActionServlet.java:414)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:709)
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:680)
org.apache.jsp.index_jsp._jspService(index_jsp.java:62)
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:388)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
java.sql.SQLException: Invalid authorization specification message from server: "Access denied for user 'root'@'localhost' (using password: YES)"
com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1997)
com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1906)
com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:2520)
com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:817)
com.mysql.jdbc.Connection.createNewIO(Connection.java:1786)
com.mysql.jdbc.Connection.<init>(Connection.java:450)
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:411)
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:83)
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:184)
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:722)
org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool.java:117)
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:108)
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:312)
com.wsy.struts.datasource.DB.<init>(DB.java:15)
com.wsy.struts.bean.ForumBean.getRecord(ForumBean.java:95)
com.wsy.struts.action.IndexAction.execute(IndexAction.java:25)
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.doGet(ActionServlet.java:414)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:709)
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:680)
org.apache.jsp.index_jsp._jspService(index_jsp.java:62)
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:388)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
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.35 logs.
求高手用QQ帮我解决。
下载了光盘,按照视频做的,代码没有出问题,最后就是打开项目时出现错误。
下面是在myeclipse中运行tomcat发布项目的控制台信息,虽然看不懂,但是已经觉得不对了。
2012-4-27 0:15:59 org.apache.catalina.core.AprLifecycleListener init
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\MyEclipse Enterprise Workbench 5.1.0 GA\bin;C:\Program Files\Apache Software Foundation\Tomcat 6.0\bin
2012-4-27 0:16:00 org.apache.coyote.http11.Http11Protocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2012-4-27 0:16:00 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 2222 ms
2012-4-27 0:16:00 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2012-4-27 0:16:00 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.35
2012-4-27 0:16:00 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deploying configuration descriptor manager.xml
2012-4-27 0:16:02 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory bbs
[font color=#FF0000]log4j:WARN No appenders could be found for logger (org.apache.struts.util.PropertyMessageResources).
log4j:WARN Please initialize the log4j system properly.
[/font]2012-4-27 0:16:07 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory docs
2012-4-27 0:16:07 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory ROOT
2012-4-27 0:16:07 org.apache.coyote.http11.Http11Protocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2012-4-27 0:16:07 org.apache.jk.common.ChannelSocket init
信息: JK: ajp13 listening on /0.0.0.0:8009
2012-4-27 0:16:07 org.apache.jk.server.JkMain start
信息: Jk running ID=0 time=0/109 config=null
2012-4-27 0:16:07 org.apache.catalina.startup.Catalina start
信息: Server startup in 7137 ms
最后运行就是如下错误。
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: javax.servlet.ServletException: org.apache.commons.dbcp.DbcpException: java.sql.SQLException: Invalid authorization specification message from server: "Access denied for user 'root'@'localhost' (using password: YES)"
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:502)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:412)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
javax.servlet.ServletException: org.apache.commons.dbcp.DbcpException: java.sql.SQLException: Invalid authorization specification message from server: "Access denied for user 'root'@'localhost' (using password: YES)"
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.doGet(ActionServlet.java:414)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:709)
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:680)
org.apache.jsp.index_jsp._jspService(index_jsp.java:62)
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:388)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
org.apache.commons.dbcp.DbcpException: java.sql.SQLException: Invalid authorization specification message from server: "Access denied for user 'root'@'localhost' (using password: YES)"
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:85)
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:184)
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:722)
org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool.java:117)
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:108)
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:312)
com.wsy.struts.datasource.DB.<init>(DB.java:15)
com.wsy.struts.bean.ForumBean.getRecord(ForumBean.java:95)
com.wsy.struts.action.IndexAction.execute(IndexAction.java:25)
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.doGet(ActionServlet.java:414)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:709)
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:680)
org.apache.jsp.index_jsp._jspService(index_jsp.java:62)
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:388)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
java.sql.SQLException: Invalid authorization specification message from server: "Access denied for user 'root'@'localhost' (using password: YES)"
com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1997)
com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1906)
com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:2520)
com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:817)
com.mysql.jdbc.Connection.createNewIO(Connection.java:1786)
com.mysql.jdbc.Connection.<init>(Connection.java:450)
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:411)
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:83)
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:184)
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:722)
org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool.java:117)
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:108)
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:312)
com.wsy.struts.datasource.DB.<init>(DB.java:15)
com.wsy.struts.bean.ForumBean.getRecord(ForumBean.java:95)
com.wsy.struts.action.IndexAction.execute(IndexAction.java:25)
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.doGet(ActionServlet.java:414)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:709)
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:680)
org.apache.jsp.index_jsp._jspService(index_jsp.java:62)
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:388)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
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.35 logs.
求高手用QQ帮我解决。