Tomcat 7 解决“At least one JAR was scanned for TLDs yet contained no TLDs” 的一种思路

tomcat版本 apache-tomcat-7.0.85
错误表现:出现“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”
解决方案:
1.将log4j.properties增加工程,前题是之前导入了相应的jar包。
2.打印出日志,定位错误日志
发现错误日志中有:”…Result Maps collection already contains value forxxx…”
3.到对应的xml文件,发现有相同的id。
4.找到原因:自动生成xml的时候原来的xml没有删除。
再次生成代码时,又附加了上去!所以在运行代码生成之前,要把以前已经生成的xml文件清掉,以防出错。
清除所有自动生成的class,interface,xml.然后重新生成,问题解决。
5.删除log4j.properties。

猜你喜欢

转载自blog.csdn.net/dingming001/article/details/79361664