java.sql.SQLException: Locale not recognized When Using -Duser.language and -Duser.region
(Doc ID 2637901.1)
Last updated on SEPTEMBER 03, 2024
Applies to:
JDBC - Version 12.1.0.2.0 and laterInformation in this document applies to any platform.
Symptoms
While connecting the standalone java application using JDBC Driver 12.1.0.2.0 with Oracle database 12.1.0.2 with the following parameters:
java -Duser.language=<LANGUAGE> -Duser.region=<REGION>
the following exception occurs:
Connection Failed! Check output console
java.sql.SQLException: Locale not recognized
at oracle.jdbc.driver.T4CTTIoauthenticate.setSessionFields(T4CTTIoauthenticate.java:1192)
at oracle.jdbc.driver.T4CTTIoauthenticate.(T4CTTIoauthenticate.java:265)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:579)
at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:666)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:566)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:270)
The above exception occurs only if you set both JVM parameters -Duser.language and -Duser.region to null values.
If one of them is unset or both are unset, then it works.
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Cause |
Solution |
References |