HOWTO: Suppress EJBTHREE-1337 warning
September 14, 2009 at 10:58 am 1 comment
If you are running JBoss 5.X with JBossWS there is an annoying warning that is printed each time a web service is called that looks like this:
EJBTHREE-1337: do not get WebServiceContext property from stateless bean context, it should already have been injected
First of all, don’t get alarmed – there is no actual problem. The warning is targeted at the framework developers and not at the end users – all it means is that JBossWS is using a recently deprecated API which still works. There is nothing end user can do to fix this and it doesn’t matter anyway since everything just works.
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 <category> 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.
Entry filed under: Java, Open Source, Recipies. Tags: .
1.
Mark | October 27, 2009 at 11:57 pm
Thanks, this saved me some time researching the warning message. The JBossWS project often times seems out of line with the JBossAS code. Annoying …