Closed iocanel closed 7 years ago
When do you get this?
I am running the system tests, which actually create the following template:
This error occurs in the logs of the ipaas-rest pod.
Wondering if this is caused by @chirino's https://github.com/redhat-ipaas/ipaas-rest/pull/125#pullrequestreview-24127667
It likely is. Should go away when we get the latest k8s clients in. Or we could disable the ws tests.
@chirino: just removing the test scope from okhttp was enough :-)
ok thx!
So we should remove the deps now, right? Just inherit from kube client?
yeah
Exception in thread "main" java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51) Caused by: java.lang.IllegalArgumentException: Cannot instantiate interface org.springframework.context.ApplicationContextInitializer : io.fabric8.spring.cloud.kubernetes.profile.KubernetesApplicationContextInitializer at org.springframework.boot.SpringApplication.createSpringFactoriesInstances(SpringApplication.java:423) at org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:402) at org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:393) at org.springframework.boot.SpringApplication.initialize(SpringApplication.java:260) at org.springframework.boot.SpringApplication.(SpringApplication.java:236)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1162)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1151)
at com.redhat.ipaas.runtime.Application.main(Application.java:35)
... 8 more
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [io.fabric8.spring.cloud.kubernetes.profile.KubernetesApplicationContextInitializer]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: okhttp3/TlsVersion
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:154)
at org.springframework.boot.SpringApplication.createSpringFactoriesInstances(SpringApplication.java:419)
... 15 more
Caused by: java.lang.NoClassDefFoundError: okhttp3/TlsVersion
at io.fabric8.kubernetes.client.Config.(Config.java:127)
at io.fabric8.kubernetes.client.ConfigBuilder.(ConfigBuilder.java:16)
at io.fabric8.kubernetes.client.ConfigBuilder.(ConfigBuilder.java:13)
at io.fabric8.kubernetes.client.BaseClient.(BaseClient.java:37)
at io.fabric8.kubernetes.client.DefaultKubernetesClient.(DefaultKubernetesClient.java:107)
at io.fabric8.spring.cloud.kubernetes.profile.KubernetesApplicationContextInitializer.(KubernetesApplicationContextInitializer.java:35)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:142)
... 16 more
Caused by: java.lang.ClassNotFoundException: okhttp3.TlsVersion
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:94)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 27 more