Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Wchan1594662165
Contributor II
Contributor II

tMongoDBBulkLoad Exception in Thread-2 java.lang.StringIndexOutofBoundsException

I'm using a working DEV env trying out tMongoDBBulkLoad component from JSON file following Talend's scenario guide (https://help.talend.com/reader/ywFNwfAK5Tww4ABGvi5PrQ/GT43dlXDtEuuirlA8BSKPw). However I keep getting the following error and cannot figure out what is causing it. I have the appropriate certs to access db set from JVM arguments to use cacerts. Any experienced similar error and had any luck resolving it? Thanks, help is much appreciated!

Exception in thread "Thread-2" java.lang.StringIndexOutOfBoundsException: String index out of range: -20

at java.lang.String.substring(Unknown Source)

at pocs.mongodb_poc_0_1.MongoDB_POC$2.run(MongoDB_POC.java:475)

2020-09-22T11:04:58.219-0400 Failed: (Unauthorized) there are no users authenticated

2020-09-22T11:04:58.219-0400 0 document(s) imported successfully. 0 document(s) failed to import.

Labels (2)
7 Replies
Anonymous
Not applicable

Hello,

Your index is out of range. Did you fill in MongoDB directory field with the MongoDB home directory? Could you share your tMongoDBBulkLoad component setting screenshot here and mask your sensitive data?

Best regards

Sabrina

 

 

 

Wchan1594662165
Contributor II
Contributor II
Author

Hi Sabrina,

 

Yes, I set it to where my monogoDB home directory is. Is the index out of range in my JSON file or other?

 

In addition, I noticed in Talend's component guide for tMongoDBBulkLoad (https://help.talend.com/reader/ywFNwfAK5Tww4ABGvi5PrQ/_eESGZatUg0YPq8FcgA1gg) it says there's the "NEGOTIATION" option when "required authentication" is checked. However, I don't have that option in my Talend and I think that is also affecting the authentication as this is what I select in tMongoDBInput job and it works fine to access db. Thanks!0693p000009p8CjAAI.png0693p000009p8E1AAI.png

 

 

 

 

Anonymous
Not applicable

Hello,

What's your mongodb version? V 2.6? Components were all updated with appropriate authentication capabilities depending on mongodb version.

Best regards

Sabrina

 

Wchan1594662165
Contributor II
Contributor II
Author

I'm using MongoDB 3.6.5 Enterprise. I think I found the cause of the issue but I'm unable to fix it. It seems in tMongoDBBulkLoad, I'm missing the option to "Set Authentication Database" but according to Talend's 7.3 guide, this component should have this setting. (see image below)(https://help.talend.com/reader/ywFNwfAK5Tww4ABGvi5PrQ/_eESGZatUg0YPq8FcgA1gg)

 

How would I get this setting available in tMongoDBBulkLoad? Thanks!

 

 

Anonymous
Not applicable

Hello,

Could you please clarify in which Talend version/edition you are? Here exists a jira issue about "Authentication Fields missing in tMongoDBBulkLoad" and it is fixed in 7.2.2, 7.4.1, 7.3.2, 7.3.1-R2020-06

Best regards

Sabrina

 

 

 

Wchan1594662165
Contributor II
Contributor II
Author

Hi Sabrina,

 

I'm using Talend Data Fabric 7.3.1 (licensed) that was installed a few week ago. Thanks!

 

 

 

Anonymous
Not applicable

Hello,

With your subscription solution, could you please create a support case on talend support portal so that our colleagues from support team will deliver a patch to you if needed.

Best regards

Sabrina