-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Problem when passing array to stored proc using hibernate
PostPosted: Fri Jun 16, 2006 8:53 am 
Regular
Regular

Joined: Mon May 08, 2006 6:00 am
Posts: 53
Location: India
Hi,

I am trying to execute a stored procedure which takes i/p as an Array of integer and String values.
I am calling this procedure, using jdbc connection object, which I get from hibernate session object,

connection = session.connection();

Now in my code I have following statement which is generating the given exception

ArrayDescriptor objArrayDescriptor= (ArrayDescriptor)ArrayDescriptor.createDescriptor("NUM_ARRAY",connection);

Exception

java.lang.ClassCastException
at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:103)


I am writing this issue in this forum, as I am getting jdbc connection through hibernate.

When I execute same program using normal JDBC which is obtained as shown, above statement does execute and
I am able to execute stored procedure

Class.forName("oracle.jdbc.driver.OracleDriver");
Connection connection = DriverManager.getConnection("jdbc:oracle:thin:@ip<port>:<usr><pwd><sid>);

Any idea, what might be going wrong

Thanks

Sudhir


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 05, 2007 12:19 pm 
Newbie

Joined: Mon Feb 05, 2007 12:14 pm
Posts: 2
Location: Peru
Check my answer!

http://forum.hibernate.org/viewtopic.php?t=961710&highlight=arraydescriptor

Regards,

_________________
____________________________
Richard C. De los Reyes PrĂ­ncipe
Lima - PerĂș


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.