• 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

Working with Jrun and OracleTypes.ARRAY

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
We are working with Jrun and thin drivers.
When we are using stored procedures which takes oracle types (ARRAY) datatype as in and out parameter and using datasource creation in jrun, it is throwing class cast exception.
Can any body help in using Jrun with Oracle Types and data source.
Any help would be appreciated...
Thanks
Anu
 
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is because u'r driver is trying to cast the return of the callable statement to an oracle array type which is a dirty cast. what u have to do in this case is use the oracleCallableStatement and then it shud work fine for u.....
For this purpose u will need the oracle.jdbc.driver.* and the oracle.sql.* packages which u can find bundled in a jar.
Then in u'r code:
a) Get thin connection using the oracle.jdbc.driver.OracleDriver
b) set the in array and its descriptors if any
c) then do this
OracleCallableStatement ocs = (OracleCallableStatement)conn.prepareCall("...");
d) Set the in and the out parameters
e) Then execute

Let me know if this solves the problem.
S
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic