This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC 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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "java.lang.Classcast exception in ArrayDescriptor" Watch "java.lang.Classcast exception in ArrayDescriptor" New topic
Forums: JDBC 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
wood burning stoves
subject: java.lang.Classcast exception in ArrayDescriptor
Similar Threads
classcast exception only with websphere server not for weblogic
Passing Array to Stored Procedure
Getting array of Oracle Objects
java.lang.ClassCastException: $Proxy0 cannot be cast to oracle.jdbc.OracleConnection
cannot create oracle.sql.ArrayDescriptor using connection from weblogice datasource