[localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory has finished in [99] ms解决办法

1 06-Aug-2019 22:01:22.261 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [F:\Tomcat\apache-tomcat-8.5.37-windows-x64\apache-tomcat-8.5.37\webapps\manager]
2 06-Aug-2019 22:01:22.612 警告 [localhost-startStop-1] org.apache.catalina.util.SessionIdGeneratorBase.createSecureRandom Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [255] milliseconds.
3 06-Aug-2019 22:01:22.646 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [F:\Tomcat\apache-tomcat-8.5.37-windows-x64\apache-tomcat-8.5.37\webapps\manager] has finished in [385] ms

 

在IDEA中启动Tomcat时,控制台中:


然后就卡住不动了,以前我这个项目是能够启动的,启动成功会自动弹出浏览页面。后面有一天突然打开就跑不起来了,网上查了很多,困扰了我两三天,最后解决了,这里记录下,供其他小伙伴参考。

解决方案一:

  找到jdk1.x.x_xx/jre/lib/security/Java.security文件,在文件中找到securerandom.source这个设置项,将其改为:

securerandom.source=file:/dev/./urandom。

解决方案二:

  如果在catalina.bat文件中设置了内存机制, 如:set JAVA_OPTS=-server -Xms1024m -Xmx1024m   ,用rem  注释掉,或删除 。

解决方案三:
仔细检查数据库连接文件是否写对,因为我之前要共享数据库,所以写的是局域网的ip地址,后来回家忘了换成localhost,才导致卡死
1 jdbc.driver=com.mysql.cj.jdbc.Driver
2 jdbc.url=jdbc:mysql://192.168.58.12:3307/management_of_metadata1?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=UTF-8
  <!--改成:jdbc.url=jdbc:mysql://127.0.0.1:3307/management_of_metadata1?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=UTF-8--> 3 jdbc.username=root 4 jdbc.password=root123

 

 问题解决了,其他有什么问题可以在评论区讨论

 
 
 
posted @ 2019-08-06 22:52  Thinkingcode  阅读(10640)  评论(1编辑  收藏  举报