配置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";
之后就可以了。
我的异常网推荐解决方案:The driver has not received any packets from the server.,http://www.aiyiweb.com/j2ee/345243.html