influxdata/influxdb-client-java

Caused by: java.lang.ClassNotFoundException: kotlin.jvm.internal.Intrinsics

JonSmall opened this issue · 4 comments

  1. maven import
com.influxdb influxdb-client-java 6.8.0
  1. start Application.java (Springboot)
    Expected behavior:
    application start success

Actual behavior:
Caused by: java.lang.ClassNotFoundException: kotlin.jvm.internal.Intrinsics
at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)

Specifications:

  • Client Version: 6.8.0
  • InfluxDB Version: 2.x
  • JDK Version: 8
  • Platform: windows

Caused by: java.lang.NoClassDefFoundError: kotlin/jvm/internal/Intrinsics
at okio.Buffer.write(Buffer.kt)
at okhttp3.ResponseBody.create(ResponseBody.java:214)
at okhttp3.internal.Util.(Util.java:69)
at okhttp3.HttpUrl$Builder.parse(HttpUrl.java:1313)
at okhttp3.HttpUrl.get(HttpUrl.java:917)
at okhttp3.HttpUrl.parse(HttpUrl.java:905)
at com.influxdb.client.InfluxDBClientOptions$Builder$ParsedUrl.(InfluxDBClientOptions.java:689)
at com.influxdb.client.InfluxDBClientOptions$Builder$ParsedUrl.(InfluxDBClientOptions.java:681)
at com.influxdb.client.InfluxDBClientOptions$Builder.connectionString(InfluxDBClientOptions.java:504)
at com.influxdb.client.InfluxDBClientOptions$Builder.url(InfluxDBClientOptions.java:288)
at com.influxdb.client.InfluxDBClientFactory.create(InfluxDBClientFactory.java:174)
at com.influxdb.client.InfluxDBClientFactory.create(InfluxDBClientFactory.java:149)
at com.influxdb.client.InfluxDBClientFactory.create(InfluxDBClientFactory.java:127)

org.jetbrains.kotlin kotlin-stdlib 1.8.20

pom add
<properties> <okhttp3.version>4.10.0</okhttp3.version> </properties>

bednar commented

Hi @JonSmall,

it looks like a conflict in the okhttp3 version. Please make sure you are using compatible version - 4.10.0 and also compatible version of kotlin - 1.8.20.

Best regards