部署后出现了一个问题,没有报错。 但是有这么一个问题,求高人解答! the driver has not received any packets from the server:
补充下,web应用在开发环境下没有问题,在其他机器上部署时遇到了,the driver has not received any packets from the server 问题,其中代码只是修改了 mysql 连接的url,将本机数据库换成了别的机器。就出现了 the driver has not received any packets from the server 不知道哪里出问题,求高手求解!
但是有这么一个问题,求高人解答!
the driver has not received any packets from the server:
原因是你没有把驱动包放在工程目录的lib下面!也就是你的工程实质上是引用本地的某个文件夹下的jar包,没有实质性的把包放进工程里!
本地的话,自然可以。因为引用嘛,就跟超链接一样
但是远程,放其他机器上,其他机器上,没有引用路径下的jar包。所以出错
解决办法很简单,把包放进工程目录lib下面,然后重新打成war包,然后放在tomcat app下面就可以了