java.lang.ClassCastException: com.parse.ParseObject cannot be cast to com.example.patri.parseapp.Message

Stack Overflow | Patrick J. | 8 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

    Simple Chat Client App closing when button clicked

    Stack Overflow | 8 months ago | Patrick J.
    java.lang.ClassCastException: com.parse.ParseObject cannot be cast to com.example.patri.parseapp.Message

    Root Cause Analysis

    1. java.lang.ClassCastException

      com.parse.ParseObject cannot be cast to com.example.patri.parseapp.Message

      at com.example.patri.parseapp.ChatListAdapter.getView()
    2. com.example.patri
      ChatListAdapter.getView
      1. com.example.patri.parseapp.ChatListAdapter.getView(ChatListAdapter.java:40)
      1 frame
    3. Android Platform
      FrameLayout.onMeasure
      1. android.widget.AbsListView.obtainView(AbsListView.java:2347)
      2. android.widget.ListView.measureHeightOfChildren(ListView.java:1270)
      3. android.widget.ListView.onMeasure(ListView.java:1182)
      4. android.view.View.measure(View.java:17565)
      5. android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:727)
      6. android.widget.RelativeLayout.onMeasure(RelativeLayout.java:463)
      7. android.view.View.measure(View.java:17565)
      8. android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5537)
      9. android.widget.FrameLayout.onMeasure(FrameLayout.java:436)
      9 frames
    4. Android v7
      ContentFrameLayout.onMeasure
      1. android.support.v7.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:135)
      1 frame
    5. Android Platform
      ViewGroup.measureChildWithMargins
      1. android.view.View.measure(View.java:17565)
      2. android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5537)
      2 frames
    6. Android v7
      ActionBarOverlayLayout.onMeasure
      1. android.support.v7.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:391)
      1 frame
    7. Android Platform
      FrameLayout.onMeasure
      1. android.view.View.measure(View.java:17565)
      2. android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5537)
      3. android.widget.FrameLayout.onMeasure(FrameLayout.java:436)
      4. android.view.View.measure(View.java:17565)
      5. android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5537)
      6. android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1436)
      7. android.widget.LinearLayout.measureVertical(LinearLayout.java:722)
      8. android.widget.LinearLayout.onMeasure(LinearLayout.java:613)
      9. android.view.View.measure(View.java:17565)
      10. android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5537)
      11. android.widget.FrameLayout.onMeasure(FrameLayout.java:436)
      11 frames
    8. Android
      PhoneWindow$DecorView.onMeasure
      1. com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2615)
      1 frame
    9. Android Platform
      ActivityThread.main
      1. android.view.View.measure(View.java:17565)
      2. android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2045)
      3. android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1196)
      4. android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1409)
      5. android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1084)
      6. android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5990)
      7. android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
      8. android.view.Choreographer.doCallbacks(Choreographer.java:580)
      9. android.view.Choreographer.doFrame(Choreographer.java:550)
      10. android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
      11. android.os.Handler.handleCallback(Handler.java:739)
      12. android.os.Handler.dispatchMessage(Handler.java:95)
      13. android.os.Looper.loop(Looper.java:135)
      14. android.app.ActivityThread.main(ActivityThread.java:5343)
      14 frames
    10. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:372)
      2 frames
    11. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)
      2 frames