Feedback
Did this article resolve your question/issue?

   

Article

Error "java.lang.IndexOutOfBoundsException" when connecting to MongoDB

Information

 
TitleError "java.lang.IndexOutOfBoundsException" when connecting to MongoDB
URL Nameerror-java-lang-indexoutofboundsexception-when-connecting-to-mongodb
Article Number000116471
EnvironmentProduct: Progress DataDirect for ODBC/ for MongoDB driver
Version: 08.01.0199 (B0377, U0256), 6.0.2.000259 (C0254.F000060.U000026)
OS: Windows
Database: MongoDB Atlas 3.6.7
Application: ODBC Administrator, ODBC Test, Test for JDBC
Question/Problem Description
The below error is returned from the Progress DataDirect for ODBC for MongoDB driver when attempting a test connect or connection from Microsoft's ODBC Test Tool
The below error is returned from the Progress DataDirect for JDBC for MongoDB driver when attempting a test connect from Test for JDBC utility

Return a more meaningful error message when SSL Service Name Identification (SNI) support is required when connecting with the MongoDB driver
 
Steps to ReproduceSteps to reproduce issue:
- Set up an ODBC DSN to MongoDB's cloud offering, Atlas and test connect using ODBC Administrator or ODBC Test
OR
- Set up a JDBC connection to MongoDB's cloud offering, Atlas and test connect using Test for JDBC.

Observed Results:
The below error is returned.

Expected Results:
No errors should be returned and the test connect should succeed.
Clarifying Information
During schema list preparation, the database is expecting the driver to send Service Name Identification (SNI). Support for SSL Service Name Identification (SNI) support is an enhancement. The driver is returning a misleading error message and the defects mentioned below is to fix the driver to return a more meaningful error message instead.
Error Message[DataDirect][ODBC MongoDB driver][MongoDB]java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

getConnection() Failed:
Message: [DataDirect][MongoDB JDBC Driver][MongoDB]java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
Vendor: -458
State: HY000
Defect NumberDefects XDBC-9793, XDBC-9794
Enhancement Number
Cause
The driver is returning a misleading error message for a feature that is a product enhancement.
Resolution
None at this time.
Workaround
Notes
Last Modified Date11/20/2020 7:07 AM
Files
Disclaimer The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.