zoukankan      html  css  js  c++  java
  • 不支持的字符集 (在类路径中添加 orai18n.jar): ZHS16GBK

    不支持的字符集 (在类路径中添加 orai18n.jar): ZHS16GBK

    报错图示:

    报错内容:

    Exception in thread "main" java.sql.SQLException: 不支持的字符集 (在类路径中添加 orai18n.jar): ZHS16GBK
    at oracle.sql.CharacterSetUnknown.failCharsetUnknown(CharacterSetFactoryThin.java:233)
    at oracle.sql.CharacterSetUnknown.convert(CharacterSetFactoryThin.java:194)
    at oracle.jdbc.driver.PhysicalConnection.throughDbCharset(PhysicalConnection.java:10402)
    at oracle.jdbc.driver.PhysicalConnection.enquoteIdentifier(PhysicalConnection.java:10479)
    at oracle.jdbc.driver.OracleStatement.enquoteIdentifier(OracleStatement.java:6452)
    at oracle.jdbc.driver.OracleStatement.getColumnIndex(OracleStatement.java:3853)
    at oracle.jdbc.driver.InsensitiveScrollableResultSet.findColumn(InsensitiveScrollableResultSet.java:270)
    at oracle.jdbc.driver.GeneratedResultSet.getString(GeneratedResultSet.java:596)
    at com.courage.apacheDBUtils.DBUtilsTest.main(DBUtilsTest.java:17)
    

    解决方案:

    根据报错信息提示,导入orai18n.jar或者在pom.xml中添加orai18n.jar的依赖

    <!-- https://mvnrepository.com/artifact/com.oracle.database.nls/orai18n -->
    <dependency>
        <groupId>com.oracle.database.nls</groupId>
        <artifactId>orai18n</artifactId>
        <version>19.7.0.0</version>
    </dependency>
    
  • 相关阅读:
    Ajax实现异步上传图片
    python文章的抓取
    python
    Python的MySQLdb模块安装
    import _mysql----ImportError: DLL load failed: %1 不是有效的 Win32 应用程序。
    安装第三方模块时遇到Python version 2.7 required, which was not found
    beautifulSoup安装
    安装setuptools和pip
    python 的简单抓取图片
    python
  • 原文地址:https://www.cnblogs.com/Courage129/p/14157313.html
Copyright © 2011-2022 走看看