java.lang.ClassCastException: java.lang.Long cannot be cast to > > java.lang.String at > > org.datanucleus.store.appengine.DatastoreFieldManager.fetchObjectField > > (DatastoreFieldManager.java:307) at org.datanucleus.state.AbstractStateManager.replacingObjectField > > (AbstractStateManager.java:1197) at com.shekhar.interview.entity.Question.jdoReplaceField > > (Question.java) at com.shekhar.interview.entity.Question.jdoReplaceFields > > (Question.java) at org.datanucleus.state.JDOStateManagerImpl.replaceFields > > (JDOStateManagerImpl.java:2772) at org.datanucleus.state.JDOStateManagerImpl.replaceFields > > (JDOStateManagerImpl.java:2791) at > > org.datanucleus.store.appengine.DatastorePersistenceHandler.fetchObject > > (DatastorePersistenceHandler.java:349) at org.datanucleus.store.appengine.query.DatastoreQuery.entityToPojo > > (DatastoreQuery.java:384) at org.datanucleus.store.appengine.query.DatastoreQuery.entityToPojo > > (DatastoreQuery.java:345) at org.datanucleus.store.appengine.query.DatastoreQuery.access$700 > > (DatastoreQuery.java:96) at org.datanucleus.store.appengine.query.DatastoreQuery$5.apply > > (DatastoreQuery.java:454) at org.datanucleus.store.appengine.query.DatastoreQuery$5.apply > > (DatastoreQuery.java:453) at > > org.datanucleus.store.appengine.query.StreamingQueryResult.resolveNext > > (StreamingQueryResult.java:137) at org.datanucleus.store.appengine.query.StreamingQueryResult.size > > (StreamingQueryResult.java:174)

Google Groups | shekhar | 8 years 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

    java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String

    Google Groups | 8 years ago | shekhar
    java.lang.ClassCastException: java.lang.Long cannot be cast to > > java.lang.String at > > org.datanucleus.store.appengine.DatastoreFieldManager.fetchObjectField > > (DatastoreFieldManager.java:307) at org.datanucleus.state.AbstractStateManager.replacingObjectField > > (AbstractStateManager.java:1197) at com.shekhar.interview.entity.Question.jdoReplaceField > > (Question.java) at com.shekhar.interview.entity.Question.jdoReplaceFields > > (Question.java) at org.datanucleus.state.JDOStateManagerImpl.replaceFields > > (JDOStateManagerImpl.java:2772) at org.datanucleus.state.JDOStateManagerImpl.replaceFields > > (JDOStateManagerImpl.java:2791) at > > org.datanucleus.store.appengine.DatastorePersistenceHandler.fetchObject > > (DatastorePersistenceHandler.java:349) at org.datanucleus.store.appengine.query.DatastoreQuery.entityToPojo > > (DatastoreQuery.java:384) at org.datanucleus.store.appengine.query.DatastoreQuery.entityToPojo > > (DatastoreQuery.java:345) at org.datanucleus.store.appengine.query.DatastoreQuery.access$700 > > (DatastoreQuery.java:96) at org.datanucleus.store.appengine.query.DatastoreQuery$5.apply > > (DatastoreQuery.java:454) at org.datanucleus.store.appengine.query.DatastoreQuery$5.apply > > (DatastoreQuery.java:453) at > > org.datanucleus.store.appengine.query.StreamingQueryResult.resolveNext > > (StreamingQueryResult.java:137) at org.datanucleus.store.appengine.query.StreamingQueryResult.size > > (StreamingQueryResult.java:174)

    Root Cause Analysis

    1. java.lang.ClassCastException

      java.lang.Long cannot be cast to > > java.lang.String at > > org.datanucleus.store.appengine.DatastoreFieldManager.fetchObjectField > > (DatastoreFieldManager.java:307) at org.datanucleus.state.AbstractStateManager.replacingObjectField > > (AbstractStateManager.java:1197) at com.shekhar.interview.entity.Question.jdoReplaceField > > (Question.java) at com.shekhar.interview.entity.Question.jdoReplaceFields > > (Question.java) at org.datanucleus.state.JDOStateManagerImpl.replaceFields > > (JDOStateManagerImpl.java:2772) at org.datanucleus.state.JDOStateManagerImpl.replaceFields > > (JDOStateManagerImpl.java:2791) at > > org.datanucleus.store.appengine.DatastorePersistenceHandler.fetchObject > > (DatastorePersistenceHandler.java:349) at org.datanucleus.store.appengine.query.DatastoreQuery.entityToPojo > > (DatastoreQuery.java:384) at org.datanucleus.store.appengine.query.DatastoreQuery.entityToPojo > > (DatastoreQuery.java:345) at org.datanucleus.store.appengine.query.DatastoreQuery.access$700 > > (DatastoreQuery.java:96) at org.datanucleus.store.appengine.query.DatastoreQuery$5.apply > > (DatastoreQuery.java:454) at org.datanucleus.store.appengine.query.DatastoreQuery$5.apply > > (DatastoreQuery.java:453) at > > org.datanucleus.store.appengine.query.StreamingQueryResult.resolveNext > > (StreamingQueryResult.java:137) at org.datanucleus.store.appengine.query.StreamingQueryResult.size > > (StreamingQueryResult.java:174)

      at com.shekhar.interview.dao.QuestionDAO.findAll()
    2. com.shekhar.interview
      QuestionDAO.findAll
      1. com.shekhar.interview.dao.QuestionDAO.findAll(QuestionDAO.java:45)
      1 frame