Unable to create @Body converter for class com.influxdb.client.domain.Query
silas229 opened this issue · 3 comments
Steps to reproduce:
List the minimal actions needed to reproduce the behavior.
- Create a new bucket
- Execute sample query code provided generated by InfluxDB
Expected behavior:
Execute the query and return the result
Actual behavior:
Error message when I execute client.getQueryApi().query(query);
:
Exception in thread "main" java.lang.IllegalArgumentException: Unable to create @Body converter for class com.influxdb.client.domain.Query (parameter #6)
for method QueryService.postQueryResponseBody
Adding data works like a charm :)
Specifications:
- Client Version: 6.7.0
- InfluxDB Version: 2.4.0
- JDK Version: 17
- Platform: macOS
Hi @silas229,
thanks for using our client.
It looks like problem with gson
version. Can you check the version of gson
library on your classpath? The client depends on 2.10
.
Regards
Together with gson 2.10 it works👍🏼
I don't think I have any version of gson installed. Isn't the library installed as a dependency when I install influxdb-client-java
via maven?
I don't think I have any version of gson installed. Isn't the library installed as a dependency when I install influxdb-client-java via maven?
Yes, it is. Unfortunately there could be conflict with requirements from other libraries.