连接池检测
我正在使用 netbeans 中的 glassfish 服务器在 java 中创建一个应用程序。我已经为 sql 查询执行创建了连接池和数据源。我创建了一个示例 jsp 页面来使用连接池检查横断面,如下所示。
当我在浏览器中运行此文件时,我收到此内部错误。
“javax.servlet.jsp.JspException:无法获取连接,数据源无效:”java.sql.SQLException:分配连接时出错。原因:空“”
I am creating an application in java using glassfish server in netbeans. I've created connection pool and data source for sql query execution. I have created a sample jsp page to check the transection using connection pool which is as follows.
And as I run this file in browser I get this internal error.
"javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "java.sql.SQLException: Error in allocating a connection. Cause: null""
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
找到解决方案了!! :)
问题是。我没有设置mysql的密码。在设置新的连接池时,必须提供密码。所以我刚刚添加了密码,现在它可以工作了。我希望如果其他人遇到这个问题那么这会有帮助
Got the solution!! :)
The problem was. I didn't set password for mysql. At the time setting up a new connection pool, providing password is mendatory. so I just added the password and now it is working. I hope if anybody else faces the problem then it would be helpful