Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-4381

ClassCastException when unmarshalling response from manual measure WS

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.5.1
    • Fix Version/s: 3.7
    • Component/s: Web API
    • Labels:
      None

      Description

      Here's the log:

      Exception in thread "main" org.sonar.wsclient.unmarshallers.UnmarshalException: Can not parse the response of query /api/manual_measures?resource=myProject:myResource&metric=myManualMetric: [{"id":1,"metric":"myManualMetric","resource":"myProject:myResource","val":4000,"created_at":"2013-01-01T00:00:00-0600","updated_at":"2013-01-01T00:00:00-0600"}]
             at org.sonar.wsclient.Sonar.findAll(Sonar.java:72)
             at ... [SNIP]
      Caused by: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Double
             at org.sonar.wsclient.unmarshallers.JsonUtils.getDouble(JsonUtils.java:72)
             at org.sonar.wsclient.JdkUtils.getDouble(JdkUtils.java:72)
             at org.sonar.wsclient.unmarshallers.ManualMeasureUnmarshaller.parse(ManualMeasureUnmarshaller.java:33)
             at org.sonar.wsclient.unmarshallers.ManualMeasureUnmarshaller.parse(ManualMeasureUnmarshaller.java:28)
             at org.sonar.wsclient.unmarshallers.AbstractUnmarshaller.toModels(AbstractUnmarshaller.java:51)
             at org.sonar.wsclient.Sonar.findAll(Sonar.java:70)
      

        Attachments

          Activity

            People

            Assignee:
            henryju OLD - Julien HENRY
            Reporter:
            fabemn OLD - Fabrice Bellingard
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: