• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.lang.Classcast exception in ArrayDescriptor

 
Biplab Mishra
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
============

java.lang.ClassCastException
at
oracle.jdbc.driver.PhysicalConnection.putDescriptor(PhysicalConnection.java:527

)
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
.getConnection("jdbc:default:connection:");


List al = new ArrayList();

al.add("V419006");
al.add("Plain Text");
al.add("Cumulative");
al.add("0");
al.add("|");
al.add("V419-006");
al.add("V419-006");

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
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic