-
Notifications
You must be signed in to change notification settings - Fork 130
when I use version 6.0.0, I am getting this exceptions, kotlin/jvm/internal/Intrinsics #342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @cuixin3266, thanks for using our client. The version How looks your project? Can you share your dependency tree? Do you use Maven or Gradle? Regards |
Which version Kotlin do you use? |
Can you share whole dependency tree? You can use: |
I don't seem to see the influxdb dependency, what's wrong with this? |
You probably ran the command in the wrong directory. Anyway... Can you test explicitly exclude <dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.9.0</version>
</dependency>
<dependency>
<groupId>com.influxdb</groupId>
<artifactId>influxdb-client-java</artifactId>
<version>6.0.0</version>
<exclusions>
<exclusion>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</exclusion>
</exclusions>
</dependency> ? |
This is very strange. You can try find dependency version collision by: |
I tried to delete other dependencies until I tested the springboot dependencies, I found that once I added this parent dependency, my project would report an error <parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.3.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent> I tried to use different springboot version dependencies, and the results are all errors. When using 2.1.3.RELEASE, the following errors appear Exception in thread "main" java.lang.NoSuchMethodError: kotlin.collections.ArraysKt.copyInto([B[BIII)[B
at okio.Segment.writeTo(Segment.kt:169)
at okio.Segment.compact(Segment.kt:152)
at okio.Buffer.write(Buffer.kt:1461)
at okio.Buffer.read(Buffer.kt:1473)
at okio.Buffer.writeAll(Buffer.kt:1260)
at okio.Options$Companion.buildTrieRecursive(Options.kt:189)
at okio.Options$Companion.buildTrieRecursive(Options.kt:175)
at okio.Options$Companion.buildTrieRecursive$default(Options.kt:113)
at okio.Options$Companion.of(Options.kt:72)
at okhttp3.internal.Util.<clinit>(Util.kt:70)
at okhttp3.HttpUrl$Builder.parse$okhttp(HttpUrl.kt:1239)
at okhttp3.HttpUrl$Companion.get(HttpUrl.kt:1633)
at okhttp3.HttpUrl$Companion.parse(HttpUrl.kt:1642)
at okhttp3.HttpUrl.parse(HttpUrl.kt)
at com.influxdb.client.InfluxDBClientOptions$Builder$ParsedUrl.<init>(InfluxDBClientOptions.java:644)
at com.influxdb.client.InfluxDBClientOptions$Builder$ParsedUrl.<init>(InfluxDBClientOptions.java:636)
at com.influxdb.client.InfluxDBClientOptions$Builder.connectionString(InfluxDBClientOptions.java:471)
at com.influxdb.client.InfluxDBClientOptions$Builder.url(InfluxDBClientOptions.java:274)
at com.influxdb.client.InfluxDBClientFactory.create(InfluxDBClientFactory.java:174)
at com.influxdb.client.InfluxDBClientFactory.create(InfluxDBClientFactory.java:149)
at com.example.demo.SynchronousQuery.query(SynchronousQuery.java:81)
at com.example.demo.SynchronousQuery.main(SynchronousQuery.java:19) When using 2.4.0 or 2.6.7, the following errors appear Exception in thread "main" java.lang.NoClassDefFoundError: kotlin/jvm/internal/Intrinsics
at okio.Buffer.write(Buffer.kt)
at okhttp3.ResponseBody.create(ResponseBody.java:214)
at okhttp3.internal.Util.<clinit>(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.<init>(InfluxDBClientOptions.java:644)
at com.influxdb.client.InfluxDBClientOptions$Builder$ParsedUrl.<init>(InfluxDBClientOptions.java:636)
at com.influxdb.client.InfluxDBClientOptions$Builder.connectionString(InfluxDBClientOptions.java:471)
at com.influxdb.client.InfluxDBClientOptions$Builder.url(InfluxDBClientOptions.java:274)
at com.influxdb.client.InfluxDBClientFactory.create(InfluxDBClientFactory.java:174)
at com.influxdb.client.InfluxDBClientFactory.create(InfluxDBClientFactory.java:149)
at com.example.demo.SynchronousQuery.query(SynchronousQuery.java:81)
at com.example.demo.SynchronousQuery.main(SynchronousQuery.java:19)
Caused by: java.lang.ClassNotFoundException: kotlin.jvm.internal.Intrinsics
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
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)
... 14 more when i remove the springboot parent dependency, i have right result |
|
谢谢,问题解决了 |
I have to say that |
Your idea is great, if it wasn't for the help of the community, I might still be stuck with this problem, for the less experienced, this will save the mind |
@linghengqian, @cuixin3266, @xx13295 I am very grateful for your advice and comments. I've prepared the following update of documentation: #345. Thanks again |
`
import java.util.List;
import com.influxdb.client.InfluxDBClient;
import com.influxdb.client.InfluxDBClientFactory;
import com.influxdb.client.QueryApi;
import com.influxdb.query.FluxRecord;
import com.influxdb.query.FluxTable;
public class SynchronousQuery {
}`
Steps to reproduce:
List the minimal actions needed to reproduce the behavior.
Exception in thread "main" 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:644)
at com.influxdb.client.InfluxDBClientOptions$Builder$ParsedUrl.(InfluxDBClientOptions.java:636)
at com.influxdb.client.InfluxDBClientOptions$Builder.connectionString(InfluxDBClientOptions.java:471)
at com.influxdb.client.InfluxDBClientOptions$Builder.url(InfluxDBClientOptions.java:274)
at com.influxdb.client.InfluxDBClientFactory.create(InfluxDBClientFactory.java:174)
at com.influxdb.client.InfluxDBClientFactory.create(InfluxDBClientFactory.java:149)
at com.lanshancloud.service.SynchronousQuery.main(SynchronousQuery.java:19)
Caused by: java.lang.ClassNotFoundException: kotlin.jvm.internal.Intrinsics
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
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)
... 13 more
Expected behavior:
Show something, or perform it normally
Actual behavior:
Exceptions were thrown
Specifications:
com.influxdb
influxdb-client-java
6.0.0
The text was updated successfully, but these errors were encountered: