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

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

Solutions on the web

via Stack Overflow by Sushobhit Rajan
, 1 year ago
java.util.HashMap cannot be cast to java.lang.Comparable
via Stack Overflow by Unknown author, 2 years ago
com.simon.main.AModel cannot be cast to java.lang.Comparable
via Google Groups by Sted Alana, 2 years ago
java.util.HashMap$Entry
via Stack Overflow by ueg1990
, 2 years ago
odd.OddMove cannot be cast to java.lang.Comparable
via Stack Overflow by Jack
, 2 years ago
com.myproject.MyList cannot be cast to java.lang.Comparable
via Coderanch by annapoorna chitturi, 1 year ago
javax.swing.KeyStroke cannot be cast to java.lang.Comparable
java.lang.ClassCastException: java.util.HashMap cannot be cast to java.lang.Comparable
at java.util.TreeMap.compare(TreeMap.java:1290)
at java.util.TreeMap.put(TreeMap.java:538)
at java.util.TreeSet.add(TreeSet.java:255)
at java.util.AbstractCollection.addAll(AbstractCollection.java:344)
at java.util.TreeSet.addAll(TreeSet.java:312)
at java.util.TreeSet.(TreeSet.java:160)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
4 times, 1 month ago
Once, 6 months ago
4 times, 7 months ago
9 more bugmates

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