Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why Oracle objects return "???" for every text attribute?

Tags:

java

oracle10g

I wrote a procedure returning a plain object, having all the attributes declared as VARCHAR2. My java code, after executing the procedure, read these objectes and all I see is three question marks "???" instead of text. It seems it may be an NLS_LANG problem, but I'm not really sure.

Is this an NLS_LANG problem? How can I resolve this?

NOTE: The Java 1.5 app is querying a Oracle 10g DB.

like image 963
Esteve Camps Avatar asked Apr 18 '11 08:04

Esteve Camps


2 Answers

When using international characters with Oracle object types, you need to include the orai18n.jar which can be downloaded at the same place as the driver itself.

From the driver's readme file:

orai18n.jar: It contains classes for NLS support in Oracle Object and Collection types.

like image 193
a_horse_with_no_name Avatar answered Sep 30 '22 05:09

a_horse_with_no_name


Seems like unicode issue, try getting your Database Character Set by:

Select value from SYS.NLS_DATABASE_PARAMETERS where PARAMETER = 'NLS_CHARACTERSET'

Should the problem still exist i suggest you take a look at Unicode support with Oracle

like image 30
CloudyMarble Avatar answered Sep 30 '22 04:09

CloudyMarble