Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-58

mongoimport prints incorrect "JSON is too large" message on attempt to import invalid json

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.8.0-rc0
    • Affects Version/s: None
    • Component/s: mongoimport
    • None

      Aaron-Staples-MacBook-Pro:mongo aaron$ echo 'a' > foo.json
      Aaron-Staples-MacBook-Pro:mongo aaron$ ./mongoimport -d d -c c foo.json
      connected to: 127.0.0.1
      Tue Jan 31 15:39:03 Assertion: 10340:Failure parsing JSON string near: a
      0x110439f95 0x11043817b 0x11043839a 0x1103a6cdb 0x10fff5e5a 0x10ffebad7 0x11054871a 0x10ffe3d42 0x10ffe3bb4 
       0   mongoimport                         0x0000000110439f95 _ZN5mongo15printStackTraceERSo + 37
       1   mongoimport                         0x000000011043817b _ZN5mongo11msgassertedEiPKc + 363
       2   mongoimport                         0x000000011043839a _ZNK5mongo13ExceptionInfo6appendERNS_14BSONObjBuilderEPKcS4_ + 0
       3   mongoimport                         0x00000001103a6cdb _ZN5mongo8fromjsonEPKcPi + 411
       4   mongoimport                         0x000000010fff5e5a _ZN6Import8parseRowEPSiRN5mongo7BSONObjERi + 438
       5   mongoimport                         0x000000010ffebad7 _ZN6Import3runEv + 8805
       6   mongoimport                         0x000000011054871a _ZN5mongo4Tool4mainEiPPc + 11592
       7   mongoimport                         0x000000010ffe3d42 main + 66
       8   mongoimport                         0x000000010ffe3bb4 start + 52
      Tue Jan 31 15:39:03 exception:BSON representation of supplied JSON is too large: Failure parsing JSON string near: a
      Tue Jan 31 15:39:03 
      Tue Jan 31 15:39:03 imported 0 objects
      Tue Jan 31 15:39:03 ERROR: encountered 1 error
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            ian@mongodb.com Ian Whalen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: