I just found out that creating a connection to Oracle using JDBC Thin driver version 10.2.0.4 fails when the Locale is set to empty string, for example :
Locale.setDefault(new Locale("",""));
DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
con = DriverManager.getConnection(url, userName, password);
The above code will produce ORA-12705: Cannot access NLS data files or invalid environment specified. It works fine if I specify en US, or just en.
But if I use Oracle driver 9.2.0.1, this exact piece of code works : the NLS is set to AMERICAN.
My question is : Is this a normal, documented, change of behavior ? Maybe setting default locale to empty strings is a bad practice ?