ojdbc - JDBC ARRAY(ORACLE CollectionTYPE) use String Value Encoding in JAVA -


i'm not @ english

and english grammar wrong

wish understanding

i using array class in ojdbc6.

use it(array class) send data oracle database(procedure).

data of number type , date type in oracle.

howerver data of varchar2 type null in oracle (array)

i see diffrent solution (java path setup orai18n.jar file) have error of java.lang.nosuchmethoderror: oracle.i18n.text.converter.characterconverterogs.getinstance(i)loracle/i18n/text/converter/characterconverter;

i don't found solution problem

please how solve problem ~~ ~~

i use jdk1.7,ojdbc6.jar

----------------------------------------------orclae code---------------------------------- create or replace type xxxxxxxx_type object(

 nnnnnnn1                number ,nnnnnnn2                number ,nnnnnnn3                number ,vvvvvvv1                varchar2(150) ,nnnnnnn4                number ,dddddddd1               date ,vvvvvvv2                varchar2(250) ,nnnnnnn5                number ,dddddddd2               date ,nnnnnnn6                number ,dddddddd3               date ,nnnnnnn7                number ,vvvvvvv3               varchar2(10) ,vvvvvvv4               varchar2(30) ,vvvvvvv5               varchar2(20) ,vvvvvvv6               varchar2(80) 

--xxxxxxxx_type end

create or replace type xxxxxxxxxxx_tbl table of xxxxxxxx_type

-- xxxxxxxxxxx_tbl end

------------------------------------------java----------------------------------

public class ex_mainjava {

public static void main(string[] args){      dbpoolcon db = dbpoolcon.getinstance();      string str = "{call xxx_xxx_xxxx_xxxx_result_pkg.xx_xx_result(?,?,?)}"; try {     connection oracleconn   = (oracleconnection) db.buildpoolconnection();     callablestatement callstatement = oracleconn.preparecall(str);      object[][] x_ctr_tbl =  new object[1][16];            x_ctr_tbl[0][0] = 1;            x_ctr_tbl[0][1] = 2;         x_ctr_tbl[0][2] = 3;         x_ctr_tbl[0][3] = "abc";         x_ctr_tbl[0][4] = 4;         x_ctr_tbl[0][5] = java.sql.date.valueof("2014-06-18");         x_ctr_tbl[0][6] = "def";         x_ctr_tbl[0][7] = 5;         x_ctr_tbl[0][8] = java.sql.date.valueof("2014-06-18");         x_ctr_tbl[0][9] = 6;         x_ctr_tbl[0][10] = java.sql.date.valueof("2014-06-18");         x_ctr_tbl[0][11] = 7;         x_ctr_tbl[0][12] = "hhhh";         x_ctr_tbl[0][13] = "kkkk";         x_ctr_tbl[0][14] = "jjjj";         x_ctr_tbl[0][15] = "mmmm";        arraydescriptor oraclecollection2 = arraydescriptor.createdescriptor("xxxxxxxxxxx_tbl ".touppercase(),oracleconn);       array oraarry2 =  new array(oraclecollection2, oracleconn,x_ctr_tbl);             system.out.println(oraarry2.dump());      callstatement.registeroutparameter(1, java.sql.types.varchar);     callstatement.registeroutparameter(2, java.sql.types.integer);     callstatement.setarray(3,oraarry2);     callstatement.execute();      string s =callstatement.getstring(1);     int = callstatement.getint(2);          system.out.println("error:"+s);         system.out.println("code:"+i);      callstatement.close();       } catch (sqlexception e) {     // todo auto-generated catch block     e.printstacktrace(); }  } 

}

---------console-----------------------------------

  system.out.println(oraarry2.dump());      nnnnnnn1                1 ,nnnnnnn2                2 ,nnnnnnn3                3 vvvvvvv1                ??? <---problem nnnnnnn4                4  dddddddd1               2014-06-18 00:00:00.0 vvvvvvv2                ??? <---problem nnnnnnn5                5 dddddddd2               2014-06-18 00:00:00.0 nnnnnnn6                6  dddddddd3               2014-06-18 00:00:00.0  nnnnnnn7                7  vvvvvvv3                ???  <---problem  vvvvvvv4                ???  <---problem  vvvvvvv5                ???  <---problem  vvvvvvv6                ???  <---problem 

example code source

please me problem of ??? (problem)

thank you. read source problem


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -