Details
-
Bug
-
Status: Resolved
-
Blocker
-
Resolution: Invalid
-
4.5.2
-
None
-
None
Description
org.springframework.beans.BeanInstantiationException: Failed to instantiate Factory method 'myXXXApi' threw exception; nested exception is org.apache.commons.logging
Caused by: org.apache.commons.logging.LogConfigurationException: The chosen LogFactory implementation does not extend LogFactory. Please check your configuration. (Caused by java.lang.ClassCastException: The application has specified that a custom LogFactory implementation should be used but Class 'org.apache.commons.logging.impl.LogFactoryImpl' cannot be converted to 'org.apache.commons.logging.LogFactory'. The conflict is caused by the presence of multiple LogFactory classes in incompatible classloaders. Background can be found in http://commons.apache.org/logging/tech.html. If you have not explicitly specified a custom LogFactory then it is likely that the container has set one without your knowledge. In this case, consider using the commons-logging-adapters.jar file or specifying the standard LogFactory from the command line. Help can be found @http://commons.apache.org/logging/troubleshooting.html.) at org.apache.commons.logging.LogFactory.createFactory(LogFactory.java:1154) at java.security.AccessController.doPrivileged(Native Method) at org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:957) at org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:624) at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:655) at org.apache.http.conn.ssl.DefaultHostnameVerifier.<init>(DefaultHostnameVerifier.java:72) at org.apache.http.impl.client.HttpClientBuilder.build(HttpClientBuilder.java:955) at com.xxx.shared.ApacheFeignClientBuilder.getWithIgnoringSSL(ApacheFeignClientBuilder.java:21) at com.xxx.shared.ApiClient.<init>(ApiClient.java:66) at com.xxx.config.My.MyApiClient.<init>(MyApiClient.java:8) at com.xxx.config.My.MyApiFactory.getApiClient(MyApiFactory.java:163) at com.xxx.config.My.MyApiFactory.apiClient(MyApiFactory.java:131) at com.xxx.config.My.MyApiFactory.getClientGenericApi(MyApiFactory.java:125) at com.xxx.config.My.MyApiFactory.projectApi(MyApiFactory.java:111) at com.xxx.config.My.MyApiFactory$$EnhancerBySpringCGLIB$$b779ec7a.CGLIB$projectApi$7(<generated>) at com.xxx.config.My.MyApiFactory$$EnhancerBySpringCGLIB$$b779ec7a$$FastClassBySpringCGLIB$$597178f.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:355) at com.xxx.config.My.MyApiFactory$$EnhancerBySpringCGLIB$$b779ec7a.projectApi(<generated>) ... 3 filtered at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162) ... 41 more Caused by: java.lang.ClassCastException: The application has specified that a custom LogFactory implementation should be used but Class 'org.apache.commons.logging.impl.LogFactoryImpl' cannot be converted to 'org.apache.commons.logging.LogFactory'. The conflict is caused by the presence of multiple LogFactory classes in incompatible classloaders. Background can be found in http://commons.apache.org/logging/tech.html. If you have not explicitly specified a custom LogFactory then it is likely that the container has set one without your knowledge. In this case, consider using the commons-logging-adapters.jar file or specifying the standard LogFactory from the command line. Help can be found @http://commons.apache.org/logging/troubleshooting.html.
/** * Default {@link javax.net.ssl.HostnameVerifier} implementation. * * @since 4.4 */ @Immutable public final class DefaultHostnameVerifier implements HostnameVerifier { enum TYPE { IPv4, IPv6, DNS }; final static int DNS_NAME_TYPE = 2; final static int IP_ADDRESS_TYPE = 7; // Error goes here private final Log log = LogFactory.getLog(getClass());