欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

oracle不支持的字符集orai18n.jar?ZHS16GBK異常問題解決辦法

 更新時(shí)間:2024年02月07日 10:17:42   作者:清風(fēng)-云煙  
字符集是數(shù)據(jù)庫(kù)中用來(lái)表示和存儲(chǔ)字符的編碼系統(tǒng),這篇文章主要給大家介紹了關(guān)于oracle不支持的字符集orai18n.jar?ZHS16GBK異常問題的解決辦法,文中通過代碼介紹的非常詳細(xì),需要的朋友可以參考下

項(xiàng)目場(chǎng)景:

項(xiàng)目中有使用到oracle數(shù)據(jù)庫(kù)來(lái)存在數(shù)據(jù)。

問題描述

在使用查詢語(yǔ)句是,oracle會(huì)報(bào)錯(cuò)。

java.sql.SQLException: 不支持的字符集 (在類路徑中添加 orai18n.jar): ZHS16GBK

原因分析:

經(jīng)排查發(fā)現(xiàn)缺少oracle字符集的依賴包導(dǎo)致的。

解決方案:

如果oracle驅(qū)動(dòng)包是database.jdbc,使用以下maven配置

		<!-- Oracle 驅(qū)動(dòng)包 -->
		<dependency>
			<groupId>com.oracle.database.jdbc</groupId>
			<artifactId>ojdbc8</artifactId>
			<version>21.5.0.0</version>
			<scope>runtime</scope>
		</dependency>
		<!-- Additional library required to support Internationalization -->
		<dependency>
			<groupId>com.oracle.database.nls</groupId>
			<artifactId>orai18n</artifactId>
			<version>21.5.0.0</version>
			<scope>provided</scope>
		</dependency>

如果oracle驅(qū)動(dòng)包是oracle.jdbc,使用以下maven配置

		<!-- Oracle 驅(qū)動(dòng)包 -->
		<dependency>
			<groupId>com.oracle.jdbc</groupId>
			<artifactId>ojdbc8</artifactId>
			<version>19.3.0.0</version>
		</dependency>
		<!-- Additional library required to support Internationalization -->
		<dependency>
			<groupId>cn.easyproject</groupId>
			<artifactId>orai18n</artifactId>
			<version>12.1.0.2.0</version>
		</dependency>

總結(jié) 

到此這篇關(guān)于oracle不支持的字符集orai18n.jar ZHS16GBK異常問題解決辦法的文章就介紹到這了,更多相關(guān)oracle不支持的字符集orai18n.jar ZHS16GBK 內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

最新評(píng)論