Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Working with Jrun and OracleTypes.ARRAY

 
Aruna Velpuri
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • 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
 
sandy gupta
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic