Re: ERROR: multiple occurrences in mongoimport

1,532 views
Skip to first unread message

Gianfranco

unread,
Sep 28, 2012, 12:22:40 PM9/28/12
to mongod...@googlegroups.com
Can you check what output do you get when adding "-v" (verbose) to that command?

I've tried and if have an exact document existing already in the database/collection, no error message is displayed.
This is the same if you have twice the same document in the json file.

Can you provide a sample of the articles_split.json?

On Friday, September 28, 2012 10:34:49 AM UTC+1, Anushree Bhate wrote:
Hi All,
 
I'm repeatatively getting this error while trying to import data in mongoDB from a json file.I'm running following command to do so

D:\Old D Drive\Downloads\MongoDB\mongodb-win32-x86_64-2.2.0\mongodb-win32-x86_64-2.2.0\bin>mongoimport -d test -c articles --type json --file D:\Projects\Xurch\Parsely data\articles_split.json.01\articles_split.json

 

ERROR: multiple occurrences

 

Can somebody please suggest if I'm doing something wrong

Anushree Bhate

unread,
Oct 8, 2012, 1:51:06 AM10/8/12
to mongod...@googlegroups.com
Hi All,
 
This problem is resolved.But the issue was silly and was nothing to do with 'multiple occurrences',it was a file path issue so instead of mongoimport -d test -c articles --type json --file D:\Projects\Xurch\Parsely data\articles_split.json.01\articles_split.json when I ran mongoimport -d test -c articles --type json --file "D:\Projects\Xurch\Parsely data\articles_split.json.01\articles_split.json".It ran successfully,silly issue.Learning is at times MongoDB gives misleading error message which has nothing to do with cause of error.

Gianfranco

unread,
Oct 8, 2012, 5:33:56 AM10/8/12
to mongod...@googlegroups.com
Hi Anushree,

Thanks for letting us know the solution, and I agree this is a misleading error message.

I've filled a Jira bug report for it:

Thanks,
Gianfranco
Reply all
Reply to author
Forward
0 new messages