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

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

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via GitHub by OneLargeFarva
, 1 year ago
java.util.HashMap cannot be cast to java.util.Collection
via GitHub by rockobonaparte
, 1 year ago
java.util.HashMap cannot be cast to java.util.Collection
java.lang.ClassCastException: java.util.HashMap cannot be cast to java.util.Collection
at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.write(CollectionTypeAdapterFactory.java:60)
at com.google.gson.Gson.toJson(Gson.java:593)
at com.google.gson.Gson.toJson(Gson.java:572)
at hardcorequesting.io.SaveHandler.save(SaveHandler.java:294)
at hardcorequesting.commands.CommandSave.save(CommandSave.java:101)
at hardcorequesting.commands.CommandSave.handleCommand(CommandSave.java:33)
at hardcorequesting.commands.CommandHandler.func_184881_a(CommandHandler.java:80)
at net.minecraft.command.CommandHandler.func_175786_a(CommandHandler.java:104)
at net.minecraft.command.CommandHandler.func_71556_a(CommandHandler.java:83)
at net.minecraft.server.dedicated.DedicatedServer.func_71333_ah(DedicatedServer.java:423)
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:388)
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:613)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:471)
at java.lang.Thread.run(Thread.java:745)

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.

Write tip

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