java.lang.ClassCastException: com.google.gson.JsonObject cannot be cast to java.io.File

GitHub | cbeust | 8 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Package not created on bintray

    GitHub | 8 months ago | cbeust
    java.lang.ClassCastException: com.google.gson.JsonObject cannot be cast to java.io.File

    Root Cause Analysis

    1. java.lang.ClassCastException

      com.google.gson.JsonObject cannot be cast to java.io.File

      at com.beust.kobalt.plugin.publish.RequestBodyConverter.convert()
    2. com.beust.kobalt
      RequestBodyConverter.convert
      1. com.beust.kobalt.plugin.publish.RequestBodyConverter.convert(BintrayApi.kt:235)
      1 frame
    3. retrofit2
      OkHttpCall.execute
      1. retrofit2.ParameterHandler$Body.apply(ParameterHandler.java:270)
      2. retrofit2.ServiceMethod.toRequest(ServiceMethod.java:108)
      3. retrofit2.OkHttpCall.createRawCall(OkHttpCall.java:178)
      4. retrofit2.OkHttpCall.execute(OkHttpCall.java:162)
      4 frames
    4. com.beust.kobalt
      PublishPlugin.taskUploadBintray
      1. com.beust.kobalt.plugin.publish.BintrayApi.validatePackage(BintrayApi.kt:105)
      2. com.beust.kobalt.plugin.publish.BintrayApi.uploadMaven(BintrayApi.kt:127)
      3. com.beust.kobalt.plugin.publish.PublishPlugin.uploadBintray(PublishPlugin.kt:80)
      4. com.beust.kobalt.plugin.publish.PublishPlugin.taskUploadBintray(PublishPlugin.kt:62)
      4 frames
    5. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:497)
      4 frames
    6. com.beust.kobalt
      TaskWorker.call
      1. com.beust.kobalt.internal.TaskManager$toTaskAnnotation$1.invoke(TaskManager.kt:401)
      2. com.beust.kobalt.internal.TaskManager$toTaskAnnotation$1.invoke(TaskManager.kt:19)
      3. com.beust.kobalt.internal.TaskManager$addTask$1.call(TaskManager.kt:475)
      4. com.beust.kobalt.internal.TaskManager$addTask$1.call(TaskManager.kt:473)
      5. com.beust.kobalt.internal.TaskWorker$call$$inlined$forEach$lambda$1.invoke(TaskManager.kt:514)
      6. com.beust.kobalt.internal.TaskWorker$call$$inlined$forEach$lambda$1.invoke(TaskManager.kt:500)
      7. com.beust.kobalt.misc.BenchmarksKt.benchmarkMillis(Benchmarks.kt:5)
      8. com.beust.kobalt.internal.TaskWorker.call(TaskManager.kt:513)
      9. com.beust.kobalt.internal.TaskWorker.call(TaskManager.kt:500)
      9 frames
    7. Java RT
      Thread.run
      1. java.util.concurrent.FutureTask.run(FutureTask.java:266)
      2. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      3. java.util.concurrent.FutureTask.run(FutureTask.java:266)
      4. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      5. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      6. java.lang.Thread.run(Thread.java:745)
      6 frames