无法从Eclipse中查看Tomcat启动过程中抛出的异常 [英] Cannot view exceptions thrown during Tomcat startup from Eclipse

查看:100
本文介绍了无法从Eclipse中查看Tomcat启动过程中抛出的异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



当我通过Eclipse启动Tomcat服务器并观看 catalina.out 随着WAR文件的解压缩,Eclipse调试器将暂停并在引导线程中多次跳转到一个 NoClassDefFoundError (5 -6)启动期间。它唯一的原因是因为我已经在 NoClassDefFoundError 的实例上显式设置了断点。应用程序按预期部署和运行,但我仍然想知道 NoClassDefFoundError 发生了什么。



catalina.out 不会显示任何有关这些异常的信息,我找不到有关导致此错误的信息,而不是断点被触发的事实。



任何人都知道我可以告诉Eclipse告诉我被抛出的异常的具体情况?我有堆栈跟踪,但这并不是非常有用,因为我没有发生这些库的源代码。

解决方案

你可以看到更多的细节,如果你修改登录级别。如果您使用默认的Tomcat而不进行自定义修改,那么请编辑文件 $ {catalina.base} /conf/logging.properties 并以几行替换为FINEST:

  org.apache.catalina.level = FINEST 

在您的应用程序中,添加文件 WEB-INF / classes / logging.properties



有关详细信息,请参阅 http://tomcat.apache.org /tomcat-6.0-doc/logging.html


I'm using Eclipse to debug a web application through a local installation of Tomcat.

When I start the Tomcat server through Eclipse and watch the catalina.out as the WAR file is unpacked, the Eclipse debugger will suspend and jump to a NoClassDefFoundError in the bootstrap thread multiple times (5-6) during startup. The only reason it's doing this is because I have explicitly set breakpoints on instances of NoClassDefFoundError. The application deploys and runs as expected, but I still want to know what is going on with the NoClassDefFoundError.

catalina.out doesn't show anything about these exceptions and I can't find any information about what's causing this other than the fact that the breakpoints are being hit.

Anyone know how I can tell Eclipse to show me the specific of the exception being thrown? I have the stack trace, but it's not very helpful since I don't have the source attached for the libraries that it's occurring in.

解决方案

May be you can see more details if you modify the loggin level. If you use the default Tomcat without custom modifications, then edit the file ${catalina.base}/conf/logging.properties and replace with FINEST in several lines:

org.apache.catalina.level=FINEST

In your application, add the file WEB-INF/classes/logging.properties

For more details about that, see http://tomcat.apache.org/tomcat-6.0-doc/logging.html

这篇关于无法从Eclipse中查看Tomcat启动过程中抛出的异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆