This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Java in General and the fly likes classcast exception for creating Arraydescriptor only for websphere Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Reply locked New topic
Author

classcast exception for creating Arraydescriptor only for websphere

padmakar reddy kadem
Greenhorn

Joined: Dec 24, 2007
Posts: 10
Hi,
We are migrating the weblogic to websphere.I got the following exception for creating the ArrayDescriptor.This is working fine with weblogic.
class com.orca.message.dao.MessageDAO - java.lang.ClassCastException: com.ibm.ws.rsadapter.jdbc.WSJdbcConnection incompatible with oracle.jdbc.OracleConnection at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:149)
at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:115)
at com.orca.message.dao.MessageDAO.getAllMessages(MessageDAO.java:58)
we used websphere connection pooling.
fowwoling is the code for getting the exception.
-------------------------
code looks like this
-------------------------
import oracle.sql.ArrayDescriptor;
//getting the connection from websphere connection pooling
ArrayDescriptor arrDesc = ArrayDescriptor.createDescriptor("SEL_MSG_STATUS", conn);
arrMsgCode = new ARRAY(arrDesc, conn, msgSearchVo.getArrMsgCode().toArray());
//create callable statement
cst.setString(4, msgSearchVo.getTradeId());// Trade Id
((OracleCallableStatement)cst).setARRAY (5, arrMsgCode);
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 63208
    
  69

Please do not cross-post the same question in multiple forums. It wastes people's time when multiple redundant conversations take place. Please read this for more information.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
Have you checked out Aspose?
 
subject: classcast exception for creating Arraydescriptor only for websphere
 
jQuery in Action, 3rd edition