com.google.gson.JsonSyntaxException: java.lang.NumberFormatException: For input string: ".0"

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,

Java does not handle IPv6 nameservers before 1.8.0_60. Upgrade to the latest JVM.

,
Expert tip

This is a bug in Wise, updating to v4.10 seems to solve the problem.

Solutions on the web

via ambari-user by Henning Kropp, 1 year ago
java.lang.NumberFormatException: For input string: ".0"
via GitHub by madmaxmatze
, 2 years ago
java.lang.NumberFormatException: empty String
via GitHub by keith198
, 1 year ago
java.lang.NumberFormatException: Expected an int but was 8791751565421 at line 1 column 48 path $.currentThread.pc
via GitHub by keith198
, 1 year ago
java.lang.NumberFormatException: Expected an int but was 8791751565421 at line 1 column 48 path $.currentThread.pc
via GitHub by dlsniper
, 1 year ago
java.lang.NumberFormatException: Expected an int but was 8791751565421 at line 1 column 48 path $.currentThread.pc
via GitHub by unlink2
, 1 year ago
java.lang.NumberFormatException: Expected an int but was 30.01017294 at line 1 column 150 path $.stream.average_fps
java.lang.NumberFormatException: For input string: ".0"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:569)
at java.math.BigInteger.(BigInteger.java:461)
at java.math.BigInteger.(BigInteger.java:597)
at com.google.gson.internal.LazilyParsedNumber.intValue(LazilyParsedNumber.java:41)
at com.google.gson.JsonPrimitive.getAsInt(JsonPrimitive.java:255)
at com.google.gson.internal.bind.JsonTreeReader.nextInt(JsonTreeReader.java:197)
at com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:230)
at com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:222)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172)
at com.google.gson.Gson.fromJson(Gson.java:795)
at com.google.gson.Gson.fromJson(Gson.java:859)
at org.apache.ambari.server.state.alert.AlertDefinitionFactory$AlertDefinitionSourceAdapter.deserialize(AlertDefinitionFactory.java:350)
at org.apache.ambari.server.state.alert.AlertDefinitionFactory$AlertDefinitionSourceAdapter.deserialize(AlertDefinitionFactory.java:294)
at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58)
at com.google.gson.Gson.fromJson(Gson.java:795)
at com.google.gson.Gson.fromJson(Gson.java:761)
at com.google.gson.Gson.fromJson(Gson.java:710)
at org.apache.ambari.server.state.alert.AlertDefinitionFactory.coerce(AlertDefinitionFactory.java:195)
at org.apache.ambari.server.state.alert.AlertDefinitionHash.getAlertDefinitions(AlertDefinitionHash.java:240)
at org.apache.ambari.server.state.alert.AlertDefinitionHash.enqueueAgentCommands(AlertDefinitionHash.java:490)
at org.apache.ambari.server.state.alert.AlertDefinitionHash.enqueueAgentCommands(AlertDefinitionHash.java:460)
at org.apache.ambari.server.events.listeners.alerts.AlertHashInvalidationListener.onAmbariEvent(AlertHashInvalidationListener.java:94)
at sun.reflect.GeneratedMethodAccessor225.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.AsyncEventBus.access$001(AsyncEventBus.java:34)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Users with the same issue

4 times, 3 days ago
Once, 4 days ago
4 times, 1 week ago
16 times, 1 week ago
6 times, 1 week ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.