Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Non supported character set: oracle-character-set-178

 
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to pass a string array to a oracle stored procedure. For that I have used the following coding.

oracle.sql.ArrayDescriptor descrip = oracle.sql.ArrayDescriptor.createDescriptor(SPNAME,connection);
oracle.sql.ARRAY array = new oracle.sql.ARRAY(descrip, connection, inputObj);
cstmt.setArray(PARAMNO,array);

But when I pass a string array in to the stored procedure it throws sql exception with the non supported character set message. The stored procedure array type is varchar2. I tried adding "orai18n.jar" in to the class path but still the result was the same. So what may be the reason for getting this error. I am using jboss as my application server. Please help me.

Thank you
 
Bartender
Posts: 2658
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

it throws sql exception with the non supported character set message

Please post the exception message.
 
Dilshan Edirisuriya
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jan this is the exception I got.

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

at oracle.gss.util.NLSError.throwSQLException(NLSError.java:46)
at
oracle.sql.CharacterSetUnknown.failCharsetUnknown(CharacterSetFactoryThin.java:171)
at
oracle.sql.CharacterSetUnknown.convert(CharacterSetFactoryThin.java:135)
at oracle.xdb.XMLType.getBytesString(XMLType.java:1215)
at oracle.xdb.XMLType.getBytesValue(XMLType.java:1151)
at oracle.xdb.XMLType.toDatum(XMLType.java:323)
at oracle.xdb.XMLType.toBytes(XMLType.java:1274)
at
oracle.jdbc.driver.OraclePreparedStatement.setOPAQUE(OraclePreparedStatement.java:1757)
at
 
Water! People swim in water! Even tiny ads swim in water:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic