为了账号安全,请及时绑定邮箱和手机立即绑定

CDspace中发送请求失败

前提:

1、Tomcat部署完成(数据库配置改成我自己的了),且访问“http://localhost:8080/Imooc/ ”正常;

2、数据库部署好且正常启动;

3、redis部署好了;

问题:

CDspace中发送请求失败,CDspace日志中报错如下:

http-outgoing-0 << "</pre></p><p><b>root cause</b> <pre>java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)[\n]"

.

.

.

.

http-outgoing-0 << HTTP/1.1 500 Internal Server Error

  [DEBUG] 2017-09-20 22:27:11,481 method:org.apache.http.impl.conn.LoggingManagedHttpClientConnection.onResponseReceived(LoggingManagedHttpClientConnection.java:127)

http-outgoing-0 << Server: Apache-Coyote/1.1

  [DEBUG] 2017-09-20 22:27:11,481 method:org.apache.http.impl.conn.LoggingManagedHttpClientConnection.onResponseReceived(LoggingManagedHttpClientConnection.java:127)

http-outgoing-0 << Content-Type: text/html;charset=utf-8

  [DEBUG] 2017-09-20 22:27:11,481 method:org.apache.http.impl.conn.LoggingManagedHttpClientConnection.onResponseReceived(LoggingManagedHttpClientConnection.java:127)

http-outgoing-0 << Content-Language: en

  [DEBUG] 2017-09-20 22:27:11,481 method:org.apache.http.impl.conn.LoggingManagedHttpClientConnection.onResponseReceived(LoggingManagedHttpClientConnection.java:127)

http-outgoing-0 << Content-Length: 7772

  [DEBUG] 2017-09-20 22:27:11,482 method:org.apache.http.impl.conn.LoggingManagedHttpClientConnection.onResponseReceived(LoggingManagedHttpClientConnection.java:127)

http-outgoing-0 << Date: Wed, 20 Sep 2017 14:27:11 GMT

  [DEBUG] 2017-09-20 22:27:11,482 method:org.apache.http.impl.conn.LoggingManagedHttpClientConnection.onResponseReceived(LoggingManagedHttpClientConnection.java:127)

http-outgoing-0 << Connection: close

  HTTP/1.1 500 Internal Server Error

[DEBUG] 2017-09-20 22:27:11,516 method:org.apache.http.impl.conn.LoggingManagedHttpClientConnection.close(LoggingManagedHttpClientConnection.java:81)

http-outgoing-0: Close connection

  [DEBUG] 2017-09-20 22:27:11,516 method:org.apache.http.impl.execchain.ConnectionHolder.releaseConnection(ConnectionHolder.java:103)

Connection discarded

  [DEBUG] 2017-09-20 22:27:11,517 method:org.apache.http.impl.conn.PoolingHttpClientConnectionManager.releaseConnection(PoolingHttpClientConnectionManager.java:320)

Connection released: [id: 0][route: {}->http://localhost:8080][total kept alive: 0; route allocated: 0 of 2; total allocated: 0 of 20]

  [DEBUG] 2017-09-20 22:27:11,518 method:org.apache.http.impl.conn.PoolingHttpClientConnectionManager.shutdown(PoolingHttpClientConnectionManager.java:388)

Connection manager is shutting down

  [DEBUG] 2017-09-20 22:27:11,518 method:org.apache.http.impl.conn.PoolingHttpClientConnectionManager.shutdown(PoolingHttpClientConnectionManager.java:394)

Connection manager shut down




数据库连接我都改了呀,核对了没有问题

正在回答

1 回答

已经好了,我把mysql的root用户密码改成了“root”就可以了。

老师,你代码里,数据库连接信息是不是写死了,不是从配置文件读的啊

0 回复 有任何疑惑可以回复我~
#1

PencilDragon

已经打好的jar包是写死的,需要用zip工具直接修改properties文件或者在工程里面修改,然后重新打包。
2017-10-06 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

CDspace中发送请求失败

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信