I've launched a cloud PostgreSQL database at my organization and have had a few users test it. I thought it best to have my users use JDBC rather than ODBC in Stata to connect to the DB, as it saves them a trip to IT to install the driver. My users are all using the latest version of the PostgreSQL driver and the latest release of Stata 17, and all on Windows.
Strangely, I am able to access the database from Stata 17 and Stata 18 without issue. Two of my users, however, get the following error when they run jdbc connect
:
invalid connection property key value pair
Index 1 out of bounds for length 1
r(198);
It seems to me that this error is coming from the underlying Java Runtime, not Stata itself, as the error message is exactly the text of an ArrayIndexOutOfBoundsException in Java. In fact, these same users are able to access the DB using R, Python, and - get this - Java code compiled and run from the command line with Stata's own built-in Java Runtime environment! I have even tried modifying Stata-Java's logging.properties file (as per these instructions https://jdbc.postgresql.org/documentation/logging/) to create logs for the PostgreSQL driver in my affected users' home directories, but even that doesn't work.
Does anyone have an idea of what could be going on here? Many many thanks in advance!
Ultimately this was a bug in Stata itself, which I reported to the dev team. The issue was fixed in Stata 18.5 (22may2024).