java.lang.ClassCastException: java.util.HashMap cannot be cast to java.util.Collection

GitHub | OneLargeFarva | 7 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

    GitHub comment 231#246916272

    GitHub | 7 months ago | OneLargeFarva
    java.lang.ClassCastException: java.util.HashMap cannot be cast to java.util.Collection
  2. 0

    GitHub comment 205#225452750

    GitHub | 11 months ago | rockobonaparte
    java.lang.ClassCastException: java.util.HashMap cannot be cast to java.util.Collection
  3. 0

    GSON ClassCastException in 4.0.4?

    Google Groups | 6 years ago | BenV
    java.lang.RuntimeException: An error occured while executing doInBackground()
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long

    Google Groups | 1 year ago | Bharath PBN
    java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long
  6. 0

    Help:basic RMI question

    Google Groups | 2 decades ago | Paolo De Lutiis
    java.lang.ClassCastException: serverPackage.ServerClass_Stub at clientPackage.myApplet.init(myApplet.java:line#) at sun.applet.AppletPanel.run(AppletPanel.java:273) at java.lang.Thread.

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.ClassCastException

      java.util.HashMap cannot be cast to java.util.Collection

      at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.write()
    2. Gson
      Gson.toJson
      1. com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.write(CollectionTypeAdapterFactory.java:60)[CollectionTypeAdapterFactory$Adapter.class:?]
      2. com.google.gson.Gson.toJson(Gson.java:593)[Gson.class:?]
      3. com.google.gson.Gson.toJson(Gson.java:572)[Gson.class:?]
      3 frames
    3. hardcorequesting.io
      SaveHandler.save
      1. hardcorequesting.io.SaveHandler.save(SaveHandler.java:294)[SaveHandler.class:?]
      1 frame
    4. hardcorequesting.commands
      CommandHandler.func_184881_a
      1. hardcorequesting.commands.CommandSave.save(CommandSave.java:101)[CommandSave.class:?]
      2. hardcorequesting.commands.CommandSave.handleCommand(CommandSave.java:33)[CommandSave.class:?]
      3. hardcorequesting.commands.CommandHandler.func_184881_a(CommandHandler.java:80)[CommandHandler.class:?]
      3 frames
    5. net.minecraft.command
      CommandHandler.func_71556_a
      1. net.minecraft.command.CommandHandler.func_175786_a(CommandHandler.java:104)[k.class:?]
      2. net.minecraft.command.CommandHandler.func_71556_a(CommandHandler.java:83)[k.class:?]
      2 frames
    6. MC Server
      MinecraftServer.run
      1. net.minecraft.server.dedicated.DedicatedServer.func_71333_ah(DedicatedServer.java:423)[ld.class:?]
      2. net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:388)[ld.class:?]
      3. net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:613)[MinecraftServer.class:?]
      4. net.minecraft.server.MinecraftServer.run(MinecraftServer.java:471)[MinecraftServer.class:?]
      4 frames
    7. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:745)[?:1.8.0_91]
      1 frame