Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

java.sql.SQLException: Non supported character set: oracle-character-set-178

My application running with this below configurations TOMCAT - 6.0.18 Database - Oracle 11g enterprise Edition(11.2.0.2.0) Java Version - jdk 1.6 JDBC Driver - OJDBC14.jar(Not sure about exact version)

I am getting Oracle-Character-set-178 error, when i am passing Oracle Array type value into Stored procedure from java. Find below error message.

java.sql.SQLException: Non supported character set: oracle-character-set-178

Below is the code i am executing

String query = "{call DBA.SP_XXXX(?,?,?)}"; 
con = this.getConnection();
con=((DelegatingConnection) con).getInnermostDelegate();
oracle.sql.ArrayDescriptor descrip =oracle.sql.ArrayDescriptor.createDescriptor("DBA.ARRAY_TABLE", con);            
oracle.sql.ARRAY oracArray = new oracle.sql.ARRAY(descrip, con, arrayValue);
cs = con.prepareCall(query);                
cs.setString(1,ID); 
cs.registerOutParameter(2, java.sql.Types.VARCHAR); 
cs.setObject(3,oracArray); 
cs.execute();   

Below are the characterset value my oracle returns

PARAMETER VALUE

NLS_CHARACTERSET WE8MSWIN1252 NLS_NCHAR_CHARACTERSET AL16UTF16

i am not sure with exact version of OJDBC14.jar is running in my current setup but when i tried replacing with latest OJDBC14 and getting below error java.lang.NoSuchMethodError: oracle.i18n.text.converter.CharacterConverterOGS.getInstance(I)Loracle/sql/converter/CharacterConverters;

Please suggest me what is the issue and solution

like image 783
Vic Avatar asked Oct 18 '25 17:10

Vic


1 Answers

add this dependency:     
<dependency>
  <groupId>com.oracle.ojdbc</groupId>
  <artifactId>orai18n</artifactId>
  <version>19.3.0.0</version>
</dependency>
like image 138
Navid2025 Avatar answered Oct 20 '25 08:10

Navid2025