java.lang.NoSuchMethodError: org.apache.commons.logging.LogFactory.getClassLoader
See original GitHub issueI am getting this NoSuchMethodError. I am missing some dependency, but I don’t know what I am missing. Tried out all the commons-logging Dependency. I am using this Library along with Spring Boot.
at org.apache.commons.logging.impl.LogFactoryImpl.getClassLoader(LogFactoryImpl.java:447) ~[commons-logging-1.1.1.jar:5.0.4.RELEASE]
at org.apache.commons.logging.impl.LogFactoryImpl.initDiagnostics(LogFactoryImpl.java:476) ~[commons-logging-1.1.1.jar:5.0.4.RELEASE]
at org.apache.commons.logging.impl.LogFactoryImpl.<init>(LogFactoryImpl.java:95) ~[commons-logging-1.1.1.jar:5.0.4.RELEASE]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_171]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_171]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_171]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_171]
at java.lang.Class.newInstance(Class.java:442) ~[na:1.8.0_171]
at org.apache.commons.discovery.tools.ClassUtils.newInstance(ClassUtils.java:112) ~[commons-discovery-0.4.jar:0.4]
at org.apache.commons.discovery.tools.SPInterface.newInstance(SPInterface.java:152) ~[commons-discovery-0.4.jar:0.4]
at org.apache.commons.discovery.tools.DiscoverClass.newInstance(DiscoverClass.java:534) ~[commons-discovery-0.4.jar:0.4]
at org.apache.commons.discovery.tools.DiscoverSingleton.find(DiscoverSingleton.java:373) ~[commons-discovery-0.4.jar:0.4]
at org.apache.commons.discovery.tools.DiscoverSingleton.find(DiscoverSingleton.java:333) ~[commons-discovery-0.4.jar:0.4]
at org.apache.axis.components.logger.LogFactory$1.run(LogFactory.java:45) ~[axis-1.4.jar:na]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_171]
at org.apache.axis.components.logger.LogFactory.getLogFactory(LogFactory.java:41) ~[axis-1.4.jar:na]
at org.apache.axis.components.logger.LogFactory.<clinit>(LogFactory.java:33) ~[axis-1.4.jar:na]
at org.apache.axis.configuration.EngineConfigurationFactoryDefault.<clinit>(EngineConfigurationFactoryDefault.java:43) ~[axis-1.4.jar:na]
at com.google.api.ads.common.lib.soap.axis.conf.AdsAxisEngineConfigurationFactory.<init>(AdsAxisEngineConfigurationFactory.java:41) ~[ads-lib-axis-3.15.1.jar:na]
at com.google.api.ads.common.lib.soap.axis.conf.AdsAxisEngineConfigurationFactory$$FastClassByGuice$$d9752c39.newInstance(<generated>) ~[guice-4.0.jar:na]
at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40) ~[guice-4.0.jar:na]
at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:61) ~[guice-4.0.jar:na]
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:105) ~[guice-4.0.jar:na]
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85) ~[guice-4.0.jar:na]
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267) ~[guice-4.0.jar:na]
at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56) ~[guice-4.0.jar:na]
at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38) ~[guice-4.0.jar:na]
at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62) ~[guice-4.0.jar:na]
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:104) ~[guice-4.0.jar:na]
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85) ~[guice-4.0.jar:na]
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267) ~[guice-4.0.jar:na]
at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56) ~[guice-4.0.jar:na]
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46) ~[guice-4.0.jar:na]
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103) ~[guice-4.0.jar:na]
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40) ~[guice-4.0.jar:na]
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145) ~[guice-4.0.jar:na]
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41) ~[guice-4.0.jar:na]
at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:205) ~[guice-4.0.jar:na]
at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:199) ~[guice-4.0.jar:na]
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092) ~[guice-4.0.jar:na]
at com.google.inject.internal.InternalInjectorCreator.loadEagerSingletons(InternalInjectorCreator.java:199) ~[guice-4.0.jar:na]
at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:180) ~[guice-4.0.jar:na]
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110) ~[guice-4.0.jar:na]
at com.google.inject.Guice.createInjector(Guice.java:96) ~[guice-4.0.jar:na]
at com.google.inject.Guice.createInjector(Guice.java:73) ~[guice-4.0.jar:na]
at com.google.inject.Guice.createInjector(Guice.java:62) ~[guice-4.0.jar:na]
at com.google.api.ads.adwords.axis.factory.AdWordsServices.<clinit>(AdWordsServices.java:45) ~[adwords-axis-3.15.1.jar:na]```
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
org.apache.commons.logging.LogFactory
Ran into the same problem on an outsourced project where it seems the developers have used every possible free library in the world....
Read more >How to fix java.lang.ClassNotFoundException: org.apache. ...
LogFactory error comes when you are using Apache commons-logging directly or indirectly using frameworks like Hibernate, Spring and commons-logging-1.1.2.jar ...
Read more >org.apache.commons.logging.LogFactory
Starting a web application, but hits the following error messages : ... Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.
Read more >logging library conflict (spring 5 jcl, common-logging)
NoSuchMethodError : org.apache.commons.logging.LogFactory.getClassLoader(Ljava/lang/Class;)Ljava/lang/ClassLoader;. When moving LogFactory, go to Spring-jcl ...
Read more >java.lang.NoSuchMethodError: org.apache.commons. ...
Error: java.lang.NoSuchMethodError: org.apache.commons.logging.LogFactory.release ... Hi , I'm getting the following error when trying to activate ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@thakorji007 this issue is a year old. Please open a new issue to discuss this. Include the logs when running on your system, together with the output of
mvn dependency:tree -f path/to/your/pom.xml
.This can be resolved by simply adding the following dependency to your pom: