org.apache.axis.ConfigurationException: No service named XXX is available

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/liuao107329/article/details/53080300
解决方法: 在调用方工程中的Log4j.properties 文件中加入 
log4j.logger.org.apache.axis.ConfigurationException = INFO
或者在log4j.xml中加入 
log4j.xml 
<logger name="org.apache.axis.ConfigurationException"> 
<level value="INFO" /> 
</logger> 



原因是 : 该异常的级别太低,是debug 级别的 ,感觉没有从根本解决问题,不过可以先这样,因为,该异常,目前没有影响服务的调用

参考 : 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
阅读更多
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页