Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-1458

Aggregation problem with Enterprise version

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Duplicate
    • Icon: Major - P3 Major - P3
    • None
    • 2.12.3
    • API
    • RHEL 5.9 (open source) and 6.4 (enterprise server)

    Description

      We are getting an error on our new enterprise server that does not appear on the open source version. We use the same code but change the pointer to the servers. Both servers are MongodB 2.6.4.

      We are using Spring Data 1.6.0-RELEASE to load the MongoDB java driver.
      When we execute an aggregation using only the $out operation we see using only the $out operator to copy the collection, we get an error (below). Here is the code:
      // Get the collection
      DBCollection sourceCollection = mongoOperations.getCollection(sourceCollectionName);
      // Set up a pipeline
      List<DBObject> ops = new ArrayList<DBObject>();
      // Write to the target collection
      ops.add(new BasicDBObject("$out", targetCollectionName));
      // Do the copy
      sourceCollection.aggregate(ops);

      When the code runs, it makes sure the target collection does not exist.

      Here is the important part of the error:

      Caused by: java.lang.IllegalArgumentException: result undefined
      at com.mongodb.AggregationOutput.<init>(AggregationOutput.java:80)
      at com.mongodb.DBCollection.aggregate(DBCollection.java:1554)
      at com.mongodb.DBCollection.aggregate(DBCollection.java:1532)
      at com.bankofamerica.risk.aml.lms.service.ListService.copyCollection(ListService.java:978)

      Attachments

        Activity

          People

            Unassigned Unassigned
            michael.gozaloff@bankofamerica.com Mike Gozaloff
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: