oracle Array filled with null data in java

假如想象 提交于 2019-12-03 16:47:29

In my case (see my comment above), it was caused by encoding problem, however - without any exception or debug information. Including orai18n.jar to the project libraries solved this... it is really sad, there is no exception or something that would indicate how to solve the problem

Paulo Henrique

After hours I have founded the cause, the real problem is the NLS_CHARACTERSET of your database work with a encoding that is not supported by your client, to jdbc support others NLS_LANG is necessary add orai18n.jar in classpath. See your database settings with this sql:

SELECT * FROM NLS_DATABASE_PARAMETERS

Probably your STR_ARRAY is defined in this way:

create or replace type STR_ARRAY is table of VARCHAR2(20);

As Tomas said the problem is encoding. My solution - use NVARCHAR2 instead.

create or replace type STR_ARRAY is table of NVARCHAR2(20);

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!