Skip to content
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

MessagePack queries: Exception during parsing InfluxDB version [macOS] #485

Closed
bednar opened this issue Aug 13, 2018 · 0 comments
Closed
Assignees
Labels
Milestone

Comments

@bednar
Copy link
Contributor

bednar commented Aug 13, 2018

Hi @lxhoan,

I want to try the MessagePack queries at macOS but there is a bug in parsing InfluxDB version. On the macOS the version of InfluxDB is in a format v1.6.0 so parsing of the version fails.

The InfluxDB was installed by brew.

I also created a simple test so you can reproduce it.

The InfluxDB ping response on macOS

HTTP/1.1 204 No Content
Content-Type: application/json
Request-Id: ab0cd803-9ee2-11e8-8d8b-000000000000
X-Influxdb-Build: OSS
X-Influxdb-Version: v1.6.0
X-Request-Id: ab0cd803-9ee2-11e8-8d8b-000000000000
Date: Mon, 13 Aug 2018 10:21:40 GMT

The Exception

java.lang.NumberFormatException: For input string: "v1"

	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.lang.Integer.parseInt(Integer.java:580)
	at java.lang.Integer.parseInt(Integer.java:615)
	at org.influxdb.impl.InfluxDBImpl.executeQuery(InfluxDBImpl.java:672)
	at org.influxdb.impl.InfluxDBImpl.query(InfluxDBImpl.java:507)
	at org.influxdb.MessagePackInfluxDBTest.parsingVersionV1_6_0(MessagePackInfluxDBTest.java:201)
	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.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:513)
	at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:115)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:170)
	at org.junit.jupiter.engine.execution.ThrowableCollector.execute(ThrowableCollector.java:40)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:166)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:113)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:58)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.lambda$executeRecursively$3(HierarchicalTestExecutor.java:113)
	at org.junit.platform.engine.support.hierarchical.SingleTestExecutor.executeSafely(SingleTestExecutor.java:66)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.executeRecursively(HierarchicalTestExecutor.java:108)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.execute(HierarchicalTestExecutor.java:79)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.lambda$executeRecursively$2(HierarchicalTestExecutor.java:121)
@bednar bednar added this to the 2.13 milestone Aug 13, 2018
lxhoan added a commit to bonitoo-io/influxdb-java that referenced this issue Aug 14, 2018
lxhoan added a commit to bonitoo-io/influxdb-java that referenced this issue Aug 14, 2018
majst01 added a commit that referenced this issue Aug 18, 2018
fix issue #485 : MessagePack queries: Exception during parsing InfluxDB version [macOS]
@lxhoan lxhoan closed this as completed Aug 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants