[转]Tomcat日志查看

.今天在调试一web应用,spring+webwork ,mvn 管理,

启动tomcat 报 error:filterStart 错误

造成任何访问都报404错误,而控制台没有任何具体错误信息。

找了好久,在%Tomcat_home%\logs\下 localhost.2010-11-01.log (具体名称因时间和域名不同)发现具体错误

Java代码
1.严重: Exception starting filter webwork   
2.java.lang.NoClassDefFoundError: freemarker/template/Configuration
3. at com.opensymphony.webwork.dispatcher.FilterDispatcher.init(FilterDispatcher.java:130)
4. at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)
5. at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
6. at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:108)
7. at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3709)
8. at org.apache.catalina.core.StandardContext.start(StandardContext.java:4363)
9. at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
10. at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
11. at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
12. at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
13. at org.apache.catalina.core.StandardService.start(StandardService.java:516)
14. at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
15. at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
16. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
17. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
18. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
19. at java.lang.reflect.Method.invoke(Method.java:597)
20. at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
21. at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
22.Caused by: java.lang.ClassNotFoundException: freemarker.template.Configuration
23. at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
24. at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
25. at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
26. ... 19 more
严重: Exception starting filter webwork
java.lang.NoClassDefFoundError: freemarker/template/Configuration
at com.opensymphony.webwork.dispatcher.FilterDispatcher.init(FilterDispatcher.java:130)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:108)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3709)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4363)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.ClassNotFoundException: freemarker.template.Configuration
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 19 more


原因是没有把freemarker的包依赖进来。



在pom.xml中加入相应的包就好了。



总结:



某些错误在%Tomcat_home%\logs\的日志文件可以看到

你可能感兴趣的:([转]Tomcat日志查看)