com.mongodb.util.JSONParseException

db.UserFactualContent.find( {'$or': [ {'NAME':{'$regex':'(?i)Bangalore'}}, {'DESCRIPTION':{'$regex':'(?i)Bangalore'}}],'$and':[{'FLAG':'public' }]},{ 'DESCRIPTION': 1,'NAME': 1,'TOKEN':1}, '$orderby' : { 'clicks' : -1 } } ) ^

Solutions on the web5

  • via hibernate.org by Unknown author, 10 months ago
    db.UserFactualContent.find( {'$or': [ {'NAME':{'$regex':'(?i)Bangalore'}}, {'DESCRIPTION':{'$regex':'(?i)Bangalore'}}],'$and':[{'FLAG':'public' }]},{ 'DESCRIPTION': 1,'NAME': 1,'TOKEN':1}, '$orderby' : { 'clicks' : -1 } } ) ^
  • {'Valores': { $regex: "_param_0"$, $regex: ^"_param_1"} ,'Flag': { $regex: ^"_param_2", $regex: "_param_3"$}} ^
  • {idStr,name,code,description,price,brand,size,color} ^
  • Stack trace

    • com.mongodb.util.JSONParseException: db.UserFactualContent.find( {'$or': [ {'NAME':{'$regex':'(?i)Bangalore'}}, {'DESCRIPTION':{'$regex':'(?i)Bangalore'}}],'$and':[{'FLAG':'public' }]},{ 'DESCRIPTION': 1,'NAME': 1,'TOKEN':1}, '$orderby' : { 'clicks' : -1 } } ) ^ at com.mongodb.util.JSONParser.parse(JSON.java:230) at com.mongodb.util.JSONParser.parse(JSON.java:155) at com.mongodb.util.JSON.parse(JSON.java:92) at com.mongodb.util.JSON.parse(JSON.java:73) at org.hibernate.ogm.datastore.mongodb.query.parsing.nativequery.impl.MongoDBQueryDescriptorBuilder.build(MongoDBQueryDescriptorBuilder.java:71) at org.hibernate.ogm.datastore.mongodb.MongoDBDialect.parseNativeQuery(MongoDBDialect.java:866) at org.hibernate.ogm.datastore.mongodb.MongoDBDialect.parseNativeQuery(MongoDBDialect.java:143) at org.hibernate.ogm.dialect.impl.ForwardingGridDialect.parseNativeQuery(ForwardingGridDialect.java:200) at org.hibernate.ogm.query.impl.NativeNoSqlQueryInterpreter.getCustomQuery(NativeNoSqlQueryInterpreter.java:50) at org.hibernate.ogm.query.impl.NativeNoSqlQueryInterpreter.createQueryPlan(NativeNoSqlQueryInterpreter.java:45) at org.hibernate.engine.query.spi.QueryPlanCache.getNativeSQLQueryPlan(QueryPlanCache.java:210) at org.hibernate.ogm.hibernatecore.impl.OgmSessionImpl.list(OgmSessionImpl.java:301) at org.hibernate.ogm.query.impl.NoSQLQueryImpl.list(NoSQLQueryImpl.java:130) at org.hibernate.jpa.internal.QueryImpl.list(QueryImpl.java:593) at org.hibernate.jpa.internal.QueryImpl.getResultList(QueryImpl.java:470)

    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

    Unknown user
    Once, 1 year ago
    Once, 3 months ago