我正在关注 Netbeans 网站的教程:
https://netbeans.org/kb/docs/web/mysql-webapp.html
在这一步之前一切正常:实现 JSTL 代码 STEP 4 应该显示列表的位置我收到以下错误:
javax.servlet.ServletException: javax.servlet.jsp.JspException:
Unable to get connection, DataSource invalid: "java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: java.net.ConnectException : Error connecting to server localhost on port 1527 with message Connection refused."
root cause
javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: java.net.ConnectException :
Error connecting to server localhost on port 1527 with message Connection refused."
note 异常的完整堆栈跟踪及其根本原因可在 GlassFish Server Open Source Edition 4.0 日志中找到。
我想 netbeans 仍然尝试连接到 Derby DB。如何将其更改为 MySQL DB?我正在使用 Java EE7、MySQL、Netbeans、Glassfish 4