Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-22378

MongoDB directory fails on old MongoDB versions

    XMLWordPrintable

    Details

      Description

      MongoDB directory code uses an offset of -1 in some cases, which MongoDB 3.0 does not allow:

      com.mongodb.MongoQueryException: Query failed with error code 17287 and error message 'Can't canonicalize query: BadValue bad skip value in query' on server localhost:27017
      	at com.mongodb.connection.ProtocolHelper.getQueryFailureException(ProtocolHelper.java:131)
      	at com.mongodb.connection.QueryProtocol.execute(QueryProtocol.java:295)
      	at com.mongodb.connection.QueryProtocol.execute(QueryProtocol.java:54)
      	at com.mongodb.connection.DefaultServer$DefaultServerProtocolExecutor.execute(DefaultServer.java:168)
      	at com.mongodb.connection.DefaultServerConnection.executeProtocol(DefaultServerConnection.java:289)
      	at com.mongodb.connection.DefaultServerConnection.query(DefaultServerConnection.java:212)
      	at com.mongodb.operation.FindOperation$1.call(FindOperation.java:497)
      	at com.mongodb.operation.FindOperation$1.call(FindOperation.java:483)
      	at com.mongodb.operation.OperationHelper.withConnectionSource(OperationHelper.java:241)
      	at com.mongodb.operation.OperationHelper.withConnection(OperationHelper.java:214)
      	at com.mongodb.operation.FindOperation.execute(FindOperation.java:483)
      	at com.mongodb.operation.FindOperation.execute(FindOperation.java:80)
      	at com.mongodb.Mongo.execute(Mongo.java:818)
      	at com.mongodb.Mongo$2.execute(Mongo.java:805)
      	at com.mongodb.OperationIterable.iterator(OperationIterable.java:47)
      	at com.mongodb.FindIterableImpl.iterator(FindIterableImpl.java:143)
      	at org.nuxeo.directory.mongodb.MongoDBSession.query(MongoDBSession.java:333)
      	at org.nuxeo.directory.mongodb.MongoDBSession.query(MongoDBSession.java:318)
      	at org.nuxeo.directory.mongodb.MongoDBSession.query(MongoDBSession.java:312)
      	at org.nuxeo.directory.mongodb.MongoDBSession.query(MongoDBSession.java:306)
      	at org.nuxeo.directory.mongodb.MongoDBSession.query(MongoDBSession.java:301)
      	at MongoDBDirectoryTestCase.purgeDirectory(MongoDBDirectoryTestCase.java:88)
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: