Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

common logging jar conflict with apache axis soap client

Tags:

java

axis2

I am getting this exception while trying to call SOAP webservice using axis. basically I have written a axis client.

org.apache.commons.discovery.DiscoveryException: Class org.apache.commons.logging.impl.SLF4JLogFactory does not implement org.apache.commons.logging.LogFactory.

When I remove the all the common-logging jars, I would able to remove these errors but these jars are coming from other apis, i dont have control on them.

Is there any way to overcome this problem?

like image 727
Maneesh Kumar Avatar asked Feb 27 '12 06:02

Maneesh Kumar


People also ask

Does Log4J use Axis?

The JCL SPI (and hence Axis) uses Log4J by default if it is available (in the CLASSPATH).

What is the use of Commons Logging jar?

Apache Commons Logging (previously known as Jakarta Commons Logging or JCL) is a Java-based logging utility and a programming model for logging and for other toolkits. It provides APIs, log implementations, and wrapper implementations over some other tools.

What is Apache Axis used for?

Welcome to Apache Axis. The well known Apache Axis, and the the second generation of it, the Apache Axis2, are two Web Service containers that helps users to create, deploy, and run Web Services. Axis2 is avaialble in both Java as well as C, languages and details about each version can be found below.

What is Axis SOAP?

Introduction. Apache Axis is an implementation of the SOAP ("Simple Object Access Protocol") submission to W3C. From the draft W3C specification: SOAP is a lightweight protocol for exchanging structured information in a decentralized, distributed environment.


1 Answers

There is a pretty detailed explanation of what the issue may be and ways to debug it in the commons logging documentation. Your particular issue may be,

There is also another more unusual way in which this cast can fail: even when the binary is compatible, the implementation class loaded at runtime may be linked to a different instance of the LogFactory class. For more information, see the tech guide.

like image 117
sbridges Avatar answered Sep 20 '22 07:09

sbridges