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

Error while sending $eval with JavaScript

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Incomplete
    • Icon: Major - P3 Major - P3
    • None
    • 2.11.0, 2.11.3
    • Query Operations
    • None
    • mongo version 2.4.5 64bit.

    Description

      I am sending this command:

      { "$eval" : "var dbNamePrefix = 'logview'; var collName = 'logs'; var collectionPerDay = 10; load('/etc/db-init.js');"}

      and get this result:

      { "serverUsed" : "localhost/127.0.0.1:27000" , "errmsg" : "exception: JavaScript execution failed: Error: error loading js file: /etc/db-init.js near 'ad('/etc/db-init.js')' " , "code" : 16722 , "ok" : 0.0}

      the js file is in the correct folder.

      Attachments

        Activity

          People

            Unassigned Unassigned
            igreenfi izek greenfield
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: