java.lang.ClassCastException: java.lang.String cannot be cast to main.java.example2.Person

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

    java.lang.String cannot be cast to main.java.example.Person

    Stack Overflow | 8 months ago | Oleksandr Spodin
    java.lang.ClassCastException: java.lang.String cannot be cast to main.java.example2.Person

    Root Cause Analysis

    1. java.lang.ClassCastException

      java.lang.String cannot be cast to main.java.example2.Person

      at main.java.example2.CassandraApp.main()
    2. main.java.example2
      CassandraApp.main
      1. main.java.example2.CassandraApp.main(CassandraApp.java:40)
      1 frame
    3. 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:498)
      4 frames
    4. IDEA
      AppMain.main
      1. com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
      1 frame