1.在启动tomcat时出现这种错误,
1
|
07
:
50
:
06.372
INFO [localhost-startStop-
1
] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned
for
TLDs yet contained no TLDs. Enable debug logging
for
this
logger
for
a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
|
解决方法时:把项目从tomcat_home/webapps中移出来,放在其它位置。这样做是为了避免 tomcat 加载项目两次的坑,因为配置文件中如果配置了该项目会被加载一次,而项目在 webapps 下面又会被自动重复加载一次,这个坑会引发一些莫名奇妙的问题。
2.tomcat启动超级慢,十几分钟才能启动。
1
|
12
-Oct-
2017
14
:
20
:
59.089
WARNING [localhost-startStop-
1
] org.apache.catalina.util.SessionIdGeneratorBase.createSecureRandom Creation of SecureRandom instance
for
session ID generation using [SHA1PRNG] took [
850
,
730
] milliseconds.
|
这个启动时间非常恐怖,其实是tomcat阻塞在那里了,具体原因是我大致了解到的是,linux根据噪声来获取随机值,键盘声等。
解决方法:jdk1.8.0_111/jre/lib/security/java.security。在你的jdk安装目录下找到这个文件,替换下面的这句话,大约在第117行
重启tomcat就好了,你会发现启动超级快哦!!!