`
dwangel
  • 浏览: 260972 次
社区版块
存档分类
最新评论

配置Tomcat的JNDI数据库mysql链接出错。

阅读更多
在tomcat里配置mysql的jndi数据源,结果 启动时老出错。

其中包含信息:

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server。

检查了版本,防火墙,jar包都没问题。

上网查了下,只有这里提到跟tomcat的policy有关。

http://stackoverflow.com/questions/2172570/tomcat6-cant-connect-to-mysql-the-driver-has-not-received-any-packets-from-the

检查了下tomcat的policy,在全局的地方配了:
// enabled permission of mysql
    permission java.net.SocketPermission "127.0.0.1:3306", "connect";
之后就可以了。
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics