java.lang.ClassCastException

java.lang.String cannot be cast to com.mongodb.DBObject

Solutions on the web19441

  • via Google Groups by Pat Ferrel, 1 month ago
    java.lang.String cannot be cast to com.mongodb.DBObject
  • java.lang.String cannot be cast to com.mongodb.DBObject
  • java.lang.String cannot be cast to com.mongodb.DBObject
  • Stack trace

    • java.lang.ClassCastException: java.lang.String cannot be cast to com.mongodb.DBObject at org.hibernate.ogm.datastore.mongodb.dialect.impl.MongoDBTupleSnapshot.getKeyColumnValue(MongoDBTupleSnapshot.java:81) at org.hibernate.ogm.datastore.mongodb.dialect.impl.MongoDBTupleSnapshot.get(MongoDBTupleSnapshot.java:75) at org.hibernate.ogm.model.spi.Tuple.get(Tuple.java:50) at org.hibernate.ogm.type.descriptor.impl.BasicGridExtractor.extract(BasicGridExtractor.java:36) at org.hibernate.ogm.type.impl.AbstractGenericBasicType.nullSafeGet(AbstractGenericBasicType.java:226) at org.hibernate.ogm.type.impl.AbstractGenericBasicType.nullSafeGet(AbstractGenericBasicType.java:222) at org.hibernate.ogm.type.impl.AbstractGenericBasicType.nullSafeGet(AbstractGenericBasicType.java:213) at org.hibernate.ogm.type.impl.AbstractGenericBasicType.hydrate(AbstractGenericBasicType.java:313) at org.hibernate.ogm.type.impl.ComponentType.hydrate(ComponentType.java:96) at org.hibernate.ogm.type.impl.ComponentType.nullSafeGet(ComponentType.java:42) at org.hibernate.ogm.loader.impl.OgmLoader.extractKeysFromResultSet(OgmLoader.java:543) at org.hibernate.ogm.loader.impl.OgmLoader.getRowFromResultSet(OgmLoader.java:487) at org.hibernate.ogm.loader.impl.OgmLoader.doQuery(OgmLoader.java:371) at org.hibernate.ogm.loader.impl.OgmLoader.doQueryAndInitializeNonLazyCollections(OgmLoader.java:281) at org.hibernate.ogm.loader.impl.OgmLoader.loadEntity(OgmLoader.java:200) at org.hibernate.ogm.loader.impl.OgmLoader.loadEntities(OgmLoader.java:218) at org.hibernate.ogm.query.impl.OgmQueryLoader.listOfEntities(OgmQueryLoader.java:90) at org.hibernate.ogm.query.impl.OgmQueryLoader.list(OgmQueryLoader.java:76) at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:501) at org.hibernate.ogm.query.impl.OgmQueryTranslator.list(OgmQueryTranslator.java:127) at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:220) at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1268) at org.hibernate.internal.QueryImpl.list(QueryImpl.java:87) at org.hibernate.ogm.datastore.mongodb.test.id.embeddedid.EmbeddedIdTest.listAllEntitiesWithEmbeddedId(EmbeddedIdTest.java:35)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    You are the first who have seen this exception. Write a tip to help other users and build your expert profile.