My Oracle Support Banner

java.sql.SQLException: Locale not recognized When Using -Duser.language and -Duser.region (Doc ID 2637901.1)

Last updated on JUNE 14, 2021

Applies to:

JDBC - Version and later
Information in this document applies to any platform.


While connecting the standalone java application using JDBC Driver with Oracle database 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(
at oracle.jdbc.driver.T4CTTIoauthenticate.(
at oracle.jdbc.driver.T4CConnection.logon(
at oracle.jdbc.driver.PhysicalConnection.connect(
at oracle.jdbc.driver.T4CDriverExtension.getConnection(
at oracle.jdbc.driver.OracleDriver.connect(
at java.sql.DriverManager.getConnection(
at java.sql.DriverManager.getConnection(

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.






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

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.