wood burning stoves 2.0*
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 Android Security Essentials Live Lessons this week in the Android 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(ArrayDescriptor.java:197

at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:164

at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:149

at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:114

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
I agree. Here's the link: http://aspose.com/file-tools
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