im new to webservices.i ran 开发者_如何学编程a sample webservice(Jboss5.0.1,jdk 6) from java client. i got this warning. but application runs properly.when i searched about this warning i came to know that we dont need to worry about this. but is there any way to hide this from log?
[StatelessBeanContext] EJBTHREE-1337: do not get WebServiceContext property from stateless bean context, it should already have been injected
Thanks in advance.
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.
精彩评论