One Star

tMongoDBBulkLoad issue

Environment:
------------------
Talend Open Studio for Big Data
Version: 5.4.0
Build id: r110020-20131025-0636
OS: windows 7 Enterprise
Issue:
---------------
when using component tMongoDBBulkLoad, I got following error
----------------
Exception in component tMongoDBBulkLoad_1
java.io.IOException: Cannot run program "/bin/mongoimport": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at bd_demo.mongodbcrud_0_1.MongoDBCRUD.tMongoDBBulkLoad_1Process(MongoDBCRUD.java:1821)
at bd_demo.mongodbcrud_0_1.MongoDBCRUD.tFileInputDelimited_1Process(MongoDBCRUD.java:1744)
at bd_demo.mongodbcrud_0_1.MongoDBCRUD.runJobInTOS(MongoDBCRUD.java:2074)
at bd_demo.mongodbcrud_0_1.MongoDBCRUD.main(MongoDBCRUD.java:1939)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 8 more
disconnected
----------------
While it is ok for me to manuall run the following command as below on the same machine.
mongoimort -h xxx.xxx.xxx.xxx -d events -c ium_400_events c:/test/tes.csv --type csv --headerline
BTW, the path environment is also added.
Also attached two img on the configuration and manual command.
BTW, as checked in code, find it is specified in code with /bin/mongoimport, is there anyway to specify the location of this mongoimport in Talend?
2 REPLIES
One Star

Re: tMongoDBBulkLoad issue

Could anyone help on this?
Community Manager

Re: tMongoDBBulkLoad issue

Hi
java.io.IOException: Cannot run program "/bin/mongoimport": CreateProcess error=2, The system cannot find the file specified

It can't find the program mongoimport in the bin folder, this is because there is no a folder called bin in the <mongoDB install dir>, to solve this issue, create a bin folder in <mongoDB install dir>, and then copy the program mongoimport.exe from <mongoDB install dir> and paste it to the bin folder.
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business