• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

java.lang.Classcast exception in ArrayDescriptor

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Weeds: because mother nature refuses to be your personal bitch. But this tiny ad is willing:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic