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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

classcast exception for creating Arraydescriptor only for websphere

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
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);
 
Sheriff
Posts: 67756
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
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.
 
    Bookmark Topic Watch Topic
  • New Topic