java – Eclipse控制台没有显示任何错误/日志输出
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了java – Eclipse控制台没有显示任何错误/日志输出,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2295字,纯文字阅读大概需要4分钟。
内容图文
我正在使用Eclipse Kepler,我在Jboss EAP 6.1中运行Java Web应用程序.今天早上我注意到在部署和运行我的Web应用程序后,没有控制台输出.
但控制台输出显示我何时启动Jboss并显示所有应用程序部署的所有内容等.但之后没有任何东西在控制台中打印.
可以有人请公会我可能是什么原因我尝试了在Stackoverflow中发布的不同-2问题中提到的大量事情.
更新: –
我试过下面的代码
public class test {
public static void main(String arg[]){
System.out.println("hariom");
}
}
并且它的结果在控制台中打印但是当我部署和运行Web应用程序时,它只是没有显示任何内容.
解决方法:
问题将通过在服务器中添加以下VM参数来解决
请转到Eclipse->服务器选项卡 – >单击Open Launch Configuration – > VM参数
并在VM参数部分添加此参数
-Dorg.jboss.as.logging.per-deployment=false
这里有link更多关于这个问题的细节
After reading what has been said in this thread, I’m trying to
summarize the use of the per-deployment flag:1.0 When per-deployment is true (default):
1.1 AS7.1.2 is scanning for logging configuration files in your deployment (WAR), If a configuration file is found then that
deployment will get its own log context and be configured via the
configuration file.1.2 Once the properties file is found, it will be read and the application logging will go to wherever it has been specified to log
(with the corresponding handler).1.3 Logging jars don’t need to be included with the application.
2.0 Setting the flag to false disables this feature, and the deployment scanner will not look for these files. Therefore:
2.1 You have to use the jboss-deployment-structure.xml to exclude the AS server’s logging dependencies you are using and include them into
your deployment.2.2 Logging functionality is left up to the application. The application should have all the configuration files and required
libraries (That’s why the server’s libraries have to be excluded)2.3 If the application had, for example, a log4j.xml but no log4j dependency. The application will stop logging.
Personally, I’m using -Dorg.jboss.as.logging.per-deployment=false when
I get missing dependencies errors at during deployment so that it
displays in the console the stack trace for the missing class.
Otherwise the only error we get in AS7’s console (and server.log) is:
Services with missing/unavailable dependencies Which does not make it easy to track down the missing
dependency.
内容总结
以上是互联网集市为您收集整理的java – Eclipse控制台没有显示任何错误/日志输出全部内容,希望文章能够帮你解决java – Eclipse控制台没有显示任何错误/日志输出所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。