gpt4 book ai didi

java - 如何抑制警告 EJB THREE-1337 :do not get webservice context property

转载 作者:行者123 更新时间:2023-11-30 07:38:10 26 4
gpt4 key购买 nike

我是 web 服务的新手。我从 java 客户端运行了一个示例 web 服务(Jboss5.0.1,jdk 6)。我收到了这个警告。但应用程序运行正常。当我搜索此警告时,我开始知道我们不需要担心这个。但是有什么办法可以从日志中隐藏它吗?

[StatelessBeanContext] EJBTHREE-1337:不要从无状态 bean 上下文中获取 WebServiceContext 属性,它应该已经被注入(inject)

提前致谢。

最佳答案

http://idevone.wordpress.com/2009/09/14/howto-suppress-ejbthree-1337-warning/ :

The problem however is that the warning clutters the log file and makes debugging harder than needed. It is easy to suppress it though and I will show you how.

First, locate jboss-log4j.xml file which should be found under ${JBOSS_HOME}/server/default/conf. If you are using a runtime configuration other than default, locate the file under configuration that you actually use. This file is used to configure logging output of the JBoss.

Inside the file search for “Limit categories” – you should find a list of definitions. Edit it to look something like this:

<!-- ================ -->
<!-- Limit categories -->
<!-- ================ -->

<!-- Suppress EJBTHREE-1337 warning -->
<category name="org.jboss.ejb3.stateless.StatelessBeanContext">
<priority value="ERROR"/>
</category>

You are basically telling JBoss to suppress any WARN or lower messages from the class that generates those warnings. Now just restart JBoss and the warning should disappear.

关于java - 如何抑制警告 EJB THREE-1337 :do not get webservice context property,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2109540/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com