在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";
之后就可以了。
其中包含信息:
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";
之后就可以了。
本文解决了一个关于在Tomcat中配置MySQL JNDI数据源时遇到的问题,描述了如何通过调整Tomcat的安全策略来解决连接失败的情况。
9717

被折叠的 条评论
为什么被折叠?



