码迷,mamicode.com
首页 > 其他好文 > 详细

Axis和Log4j一起使用时,出现异常org.apache.axis.ConfigurationException

时间:2014-05-09 12:45:24      阅读:569      评论:0      收藏:0      [点我收藏+]

标签:style   class   code   java   http   c   

调用成功,但是出现异常出现异常:org.apache.axis.ConfigurationException: No service named  is available org.apache.axis.ConfigurationException: No service named  is available
 
 
Just a guess, but it looks like that error message is reporting that you‘ve left the service name blank. I imagine the code that generates that error message looks like this: 

throw
newConfigurationException("No service named"+ serviceName +" is available");
 
According to the documentation linked to by @arnonym, this exception is somewhat misleading. In the first attempt to find the service a ConfigurationException is thrown and caught. It is logged at DEBUG level by the ConfigurationException class. Then another attempt is made using a different method to find the service that may then succeed. The workaround for this is to just change the log level on the ConfigurationException class to INFO in your log4j.properties:
 
log4j.logger.org.apache.axis.ConfigurationException= INFO
 
我采用的第二种方法,加上之后没有再打印异常信息了。
 

Axis和Log4j一起使用时,出现异常org.apache.axis.ConfigurationException,布布扣,bubuko.com

Axis和Log4j一起使用时,出现异常org.apache.axis.ConfigurationException

标签:style   class   code   java   http   c   

原文地址:http://www.cnblogs.com/skyeyh/p/3708854.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!