Why am I getting this runtime error on this Java code?
CloseableHttpClient client = HttpClients.createDefault();
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.apache.http.conn.ssl.DefaultHostnameVerifier.(DefaultHostnameVerifier.java:70) at org.apache.http.impl.client.HttpClientBuilder.build(HttpClientBuilder.java:944) at org.apache.http.impl.client.HttpClients.createDefault(HttpClients.java:58) at com.epsilon.SeismicExtractOAuth2.main(SeismicExtractOAuth2.java:206)
Java
Last Comment
Jeffrey Dake
8/22/2022 - Mon
CEHJ
You need to add the Commons logging libraries to your project/classpath
Jeffrey Dake
Looks like when you compiled your code the apache common-logging package was included. However when you ran your program, the classpath for your program did not include the location of where those files are.
CEHJ
Yes, that's more precise ;) Of course, it could have been compiled by someone else ...