org.apache.commons.discovery.DiscoveryException: No implementation defined for org.apache.commons.logging.LogFactory

Kanmani picture Kanmani · Aug 12, 2014 · Viewed 8.3k times · Source

I have a web service client running in my karaf when trying to start the osgi bundle the following error is thrown

org.osgi.framework.BundleException: Activator start error in bundle wsdlclient [83].
at org.apache.felix.framework.Felix.activateBundle(Felix.java:2196)[org.apache.felix.framework-4.2.1.jar:]
at org.apache.felix.framework.Felix.startBundle(Felix.java:2064)[org.apache.felix.framework-4.2.1.jar:]
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:955)[org.apache.felix.framework-4.2.1.jar:]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1263)[11:org.apache.felix.fileinstall:3.2.8]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1235)[11:org.apache.felix.fileinstall:3.2.8]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1224)[11:org.apache.felix.fileinstall:3.2.8]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:519)[11:org.apache.felix.fileinstall:3.2.8]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:308)[11:org.apache.felix.fileinstall:3.2.8]
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.apache.axis.client.AxisClient
at org.apache.axis.client.Service.getAxisClient(Service.java:104)
at org.apache.axis.client.Service.<init>(Service.java:113)
at com.sample.SayHelloServiceLocator.<init>(SayHelloServiceLocator.java:12)
at com.sample.MainGreet.greet(MainGreet.java:12)
at wsdlclient.Activator.start(Activator.java:23)
at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:645)
at org.apache.felix.framework.Felix.activateBundle(Felix.java:2146)

and it was due to

org.apache.commons.discovery.DiscoveryException: No implementation defined for org.apache.commons.logging.LogFactory

can anyone help solving any of errors

I have installed all the dependencies axis.jar,saaj.jar,wsdl4j.jar,commons-discovery.jar, commons-logging.jar

Answer

Kanmani picture Kanmani · Aug 12, 2014

Adding the commons logging jar which is a bundle (Manifest file with bundle attributes) will solve this problem. I removed the jar and installed This jar file