解决方法: 在调用方工程中的Log4j.properties 文件中加入
log4j.logger.org.apache.axis.ConfigurationException = INFO
或者在log4j.xml中加入
log4j.xml <logger name="org.apache.axis.ConfigurationException"> <level value="INFO" /> </logger>
原因是 : 该异常的级别太低,是debug 级别的 ,感觉没有从根本解决问题,不过可以先这样,因为,该异常,目前没有影响服务的调用
-
org.apache.axis.ConfigurationException: No service named XXX is available
参考 : https://wiki.apache.org/ws/FrontPage/Axis/DealingWithCommonExceptions
This is logged because this code in AxisEngine (line 308 in Axis 1.x):
public SOAPService getService(String name) throws AxisFault { try { return config.getService(new QName(null, name)); } catch (ConfigurationException e) { try { return config.getServiceByNamespaceURI(name); } catch (ConfigurationException e1) { throw new AxisFault(e); } } }
depends on an exception being thrown on the first attempt (line 311) to then try a different method of finding the service (which succeeds if you see no log of the AxisFault on line 316). The log entry is created because a ConfigurationException logs itself (at DEBUG level) on creation (questionable practice, imho). To avoid this misleading log entry you'll want to add this to your log4j.properties file:
log4j.logger.org.apache.axis.ConfigurationException = INFO