com.google.gson.JsonSyntaxException

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

Samebug tips2

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


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

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web417

  • via ambari-user by Henning Kropp, 1 year ago
    java.lang.NumberFormatException: For input string: ".0"
  • via Sonatype JIRA by Joe Tom, 1 year ago
    java.lang.NumberFormatException: For input string: ""
  • via GitHub by mariusw
    , 1 year ago
    java.lang.NumberFormatException: For input string: "268666515_4245834"
  • Stack trace

    • com.google.gson.JsonSyntaxException: java.lang.NumberFormatException: For input string: ".0" at com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:232) 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 com.google.gson.Gson$2.deserialize(Gson.java:131) 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 com.google.gson.Gson.fromJson(Gson.java:682) 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 com.google.common.eventbus.AsyncEventBus$1.run(AsyncEventBus.java:100) 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) Caused by: 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.<init>(BigInteger.java:461) at java.math.BigInteger.<init>(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) ... 30 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Once, 5 months ago
    Unknown user
    Once, 11 months ago
    Unknown user
    Once, 1 year ago
    7 times, 1 hour ago
    10 times, 11 hours ago
    195 more bugmates