This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes java.lang.Classcast exception in ArrayDescriptor Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "java.lang.Classcast exception in ArrayDescriptor" Watch "java.lang.Classcast exception in ArrayDescriptor" New topic
Forums: JDBC and Relational Databases Oracle/OAS

java.lang.Classcast exception in ArrayDescriptor

Biplab Mishra

Joined: Jul 22, 2011
Posts: 4
HI All,

We are facing below java.lang.ClassCastException inside a java stored procedure when using ArrayDescriptoy. We have a pl/sql procedure which internally calling a java stored procedure and the error is coming while associating the sql type with connection object in ArrayDescriptor.

Below is the error


at oracle.sql.ArrayDescriptor.createDescriptor(

at oracle.sql.ArrayDescriptor.createDescriptor(

at oracle.sql.ArrayDescriptor.createDescriptor(

at oracle.sql.ArrayDescriptor.createDescriptor(

at TestDatabase.addNumbers1(TestDatabase:92)

My Java Code

conn = (OracleConnection) DriverManager

List al = new ArrayList();

al.add("Plain Text");

Object[] arrayToPassToDB = globalToDBArrayForamt(al, 6);

String procedure = "{CALL study_definition_api_pkg.pr_control_study_load(?,?,?)}";

String arrayDesc = "CONTROL_STUDY_TAB";

CallableStatement st = con.prepareCall(procedure);

ArrayDescriptor des = ArrayDescriptor.createDescriptor(arrayDesc, con); -- this is causing error
rocket mass heater kickstarter
subject: java.lang.Classcast exception in ArrayDescriptor