Amya28 opened a new issue, #2151:
URL: https://github.com/apache/logging-log4j2/issues/2151
## Description
While using the latest log4j release version ; we encountered the following
error :
ERROR StatusConsoleListener Unable to create Lookup for k8s
java.lang.NoSuchMethodError: 'io.fabric8.kubernetes.client.ConfigFluent
io.fabric8.kubernetes.client.ConfigBuilder.withRollingTimeout(long)'
Debugging we found that in latest version of **kubernetes-client-api** they
removed the **getRollingTimeout** calls which is still referred in latest
version of log4j-Kubernetes jar.
https://github.com/fabric8io/kubernetes-client/commit/f12e14b2b9cebe38efae60a910d849767fd45cb4
Even tough the Release notes
https://github.com/apache/logging-log4j2/releases specify the Kubernetes client
to version
[5.12.4](https://github.com/fabric8io/kubernetes-client/releases?q=5.12.4)
Can anyone have a look at it. we need to specify the version explicitly for
kubernetes client under log4j pom.xmls.
[A clear and concise description of what the bug is.]
## Configuration
**Version:** [[2.22.0]
(https://github.com/apache/logging-log4j2/releases/tag/rel%2F2.22.0)]
**Operating system:** [Windows 10]
**JDK:** [17]
## Logs
```
[Stacktraces, errors, etc. relevant applications logs.]
ERROR StatusConsoleListener Unable to create Lookup for k8s
java.lang.NoSuchMethodError: 'io.fabric8.kubernetes.client.ConfigFluent
io.fabric8.kubernetes.client.ConfigBuilder.withRollingTimeout(long)'
at
org.apache.logging.log4j.kubernetes.KubernetesClientBuilder.kubernetesClientConfig(KubernetesClientBuilder.java:69)
at
org.apache.logging.log4j.kubernetes.KubernetesClientBuilder.createClient(KubernetesClientBuilder.java:35)
at
org.apache.logging.log4j.kubernetes.KubernetesLookup.initialize(KubernetesLookup.java:89)
at
org.apache.logging.log4j.kubernetes.KubernetesLookup.<init>(KubernetesLookup.java:70)
at
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
at
java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at
java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
at
java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
at
org.apache.logging.log4j.core.util.ReflectionUtil.instantiate(ReflectionUtil.java:189)
at
org.apache.logging.log4j.core.lookup.Interpolator.<init>(Interpolator.java:86)
at
org.apache.logging.log4j.core.lookup.Interpolator.<init>(Interpolator.java:105)
at
org.apache.logging.log4j.core.config.AbstractConfiguration.<init>(AbstractConfiguration.java:135)
at
org.apache.logging.log4j.core.config.DefaultConfiguration.<init>(DefaultConfiguration.java:46)
at
org.apache.logging.log4j.core.LoggerContext.<init>(LoggerContext.java:84)
at
org.apache.logging.log4j.core.selector.ClassLoaderContextSelector.createContext(ClassLoaderContextSelector.java:254)
at
org.apache.logging.log4j.core.selector.ClassLoaderContextSelector.locateContext(ClassLoaderContextSelector.java:218)
at
org.apache.logging.log4j.core.selector.ClassLoaderContextSelector.getContext(ClassLoaderContextSelector.java:136)
at
org.apache.logging.log4j.core.selector.ClassLoaderContextSelector.getContext(ClassLoaderContextSelector.java:123)
at
org.apache.logging.log4j.core.selector.ClassLoaderContextSelector.getContext(ClassLoaderContextSelector.java:117)
at
org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:150)
at
org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:47)
at
org.apache.logging.log4j.LogManager.getContext(LogManager.java:196)
at
org.apache.commons.logging.LogAdapter$Log4jLog.<clinit>(LogAdapter.java:146)
at
org.apache.commons.logging.LogAdapter$Log4jAdapter.createLog(LogAdapter.java:113)
at
org.apache.commons.logging.LogAdapter.createLog(LogAdapter.java:95)
at
org.apache.commons.logging.LogFactoryService.getInstance(LogFactoryService.java:52)
at
org.apache.commons.logging.LogFactoryService.getInstance(LogFactoryService.java:47)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:655)
## Reproduction
[An isolated test reproducing the test.
JUnit tests similar to the ones in the code base are extremely appreciated.]
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]