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


调用成功,但是出现异常 出现异常: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
 
我采用的第二种方法,加上之后没有再打印异常信息了。
 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM