common logging jar conflict with apache axis soap client

Maneesh Kumar picture Maneesh Kumar · Feb 27, 2012 · Viewed 16.7k times · Source

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?

Answer

sbridges picture sbridges · Feb 27, 2012

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.