java.lang.ClassCastException: Test$Foo cannot be cast to java.lang.String

Google Groups | Dale Wijnand | 10 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Fixing SI-7685: value classes crippled by nesting restriction

    Google Groups | 10 months ago | Dale Wijnand
    java.lang.ClassCastException: Test$Foo cannot be cast to java.lang.String
  2. 0

    cannot be cast to extend class

    Stack Overflow | 3 years ago | Mohammed Jemmoudi
    java.lang.ClassCastException: Arbre$Noeud cannot be cast to ArbreAVL$NoeudAVL
  3. 0

    Lazy class cast in Java?

    Stack Overflow | 4 years ago | IonuČ› G. Stan
    java.lang.ClassCastException: Test$ChildA cannot be cast to Test$ChildB
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Long to Double in Jexl

    Stack Overflow | 5 years ago | dizpers
    java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Double
  6. 0

    Issue with >

    Stack Overflow | 3 years ago | BWalsh
    java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Ljava.lang.Comparable; at HeapArray.<init>(HeapArray.java:16) at HeapArray.<init>(HeapArray.java:10)

    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

      Test$Foo cannot be cast to java.lang.String

      at Test$.main()
    2. Unknown
      Test.main
      1. Test$.main(t7685-class-simple.scala:7)
      2. Test.main(t7685-class-simple.scala)
      2 frames
    3. Java RT
      NativeMethodAccessorImpl.invoke0
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      1 frame