对于java.sql.SQLException: Locale not recognized的处理
2014-09-12 11:27
686 查看
Your operating system platform default locale is apparently not supported by the Oracle JDBC driver. Change your operating system platform default locale to something more common. You can also do it on a per JVM runtime basis by adding the following VM arguments:
This sets the JVM default locale to
----------------------------------------------------------------------------------------
You pass different locale to your application
In the code, jdbc tries to establish connection with this locale
But the locale is not supported by the DBMS
So, you can do the following
Take backup of current locale
Set locale before acquiring connection
Acquire connection
Set the backup locale
-Duser.language=en -Duser.country=US
This sets the JVM default locale to
en_US(English / United States).
----------------------------------------------------------------------------------------
You pass different locale to your application
In the code, jdbc tries to establish connection with this locale
But the locale is not supported by the DBMS
So, you can do the following
Take backup of current locale
Locale backup = Locale.getDefault();
Set locale before acquiring connection
Locale.setDefault(Locale.US);
Acquire connection
Set the backup locale
相关文章推荐
- java.sql.SQLException: Locale not recognized处理
- mysql的utf8mb4编码以及java.sql.SQLException: Incorrect string value: '\xF0\x9F\x92\x94' 问题的处理
- 数据库连接时一个异常的处理:java.sql.SQLException: No suitable driver found for
- ssh项目中对抛出java.sql.SQLException: No suitable driver异常的处理
- 安装 Oracle 10G 的 OWB java.sql.SQLException: ORA-22905: 无法从非嵌套表项访问行
- JTDS连接错误java.sql.SQLException: I/O Error: SSO Failed: Native SSPI library not loaded. Check the java.lib
- 读取数据库到ArrayList时出现java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]无效的描述符索引的原因
- sql 日期函数之对于周的处理
- java.sql.SQLException: 对只转发结果集的无效操作: absolute beforeFirst
- java.sql.SQLException: ORA-01000: 超出打开游标的最大数
- java.sql.SQLException: ORA-00903: invalid table name
- java.sql.SQLException: ORA-00600: 内部错误代码,参数: [ttcgcshnd-1], [0], [], [], [], [], [], []
- java.sql.SQLException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for
- java.sql.SQLException: No suitable driver问题的解决
- java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]对象名 ‘xxx’ 无效
- java.sql.SQLException: Unknown type '246 in column 0 of 1 in binary-encoded result set的解决办法
- JAVA 处理时间 - java.sql.Date、java.util.Date与数据库中的Date字段的转换方法
- JDBC规范-java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]The specified SQL type is not supported by this driver
- java.sql.SQLException: ORA-00904: "PASSWORD": 标识符无效
- java中对于initializer的处理方式