首页 > 代码库 > Axis和Log4j一起使用时,出现异常org.apache.axis.ConfigurationException
Axis和Log4j一起使用时,出现异常org.apache.axis.ConfigurationException
调用成功,但是出现异常出现异常:org.apache.axis.ConfigurationException: No service named is available org.apache.axis.ConfigurationException: No service named is available
解决方法:stackoverflow上 http://stackoverflow.com/questions/65310/apache-axis-configurationexception
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:
thrownewConfigurationException("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
我采用的第二种方法,加上之后没有再打印异常信息了。
另:参考http://wiki.apache.org/ws/FrontPage/Axis/DealingWithCommonExceptions
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。