arraysoracle11gtomcat6ojdbcoracle-type

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


Solution

  • Resolved my issue with following solution: replaced ojdbc14.jar with exact versions of ojdbc6.jar & orai18n.jar which supports my oracle 11.2.0.2.