Skip to content
This repository has been archived by the owner on Mar 26, 2018. It is now read-only.

ClassNotFoundException: okhttp3.TlsVersion #129

Closed
iocanel opened this issue Mar 1, 2017 · 9 comments
Closed

ClassNotFoundException: okhttp3.TlsVersion #129

iocanel opened this issue Mar 1, 2017 · 9 comments

Comments

@iocanel
Copy link
Contributor

iocanel commented Mar 1, 2017

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

@jimmidyson
Copy link
Contributor

When do you get this?

@iocanel
Copy link
Contributor Author

iocanel commented Mar 1, 2017

I am running the system tests, which actually create the following template:

https://raw.githubusercontent.com/redhat-ipaas/openshift-templates/master/redhat-ipaas-single-tenant.yml

This error occurs in the logs of the ipaas-rest pod.

@jimmidyson
Copy link
Contributor

Wondering if this is caused by @chirino's #125 (review)

iocanel referenced this issue Mar 2, 2017
Recordings test helper enhanced so that it can also proxy/record invocations on concrete classes in addition to interfaces.
@iocanel iocanel closed this as completed in de0d601 Mar 2, 2017
iocanel added a commit that referenced this issue Mar 2, 2017
Update to the latest client and spring-cloud-kubernetes. Fix #129.
@chirino
Copy link
Contributor

chirino commented Mar 2, 2017

It likely is. Should go away when we get the latest k8s clients in. Or we could disable the ws tests.

@iocanel
Copy link
Contributor Author

iocanel commented Mar 2, 2017

@chirino: just removing the test scope from okhttp was enough :-)

@chirino
Copy link
Contributor

chirino commented Mar 2, 2017

ok thx!

@jimmidyson
Copy link
Contributor

So we should remove the deps now, right? Just inherit from kube client?

@chirino
Copy link
Contributor

chirino commented Mar 2, 2017

yeah

@jimmidyson
Copy link
Contributor

Done in #133

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants