Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

classcast exception only with websphere server not for weblogic

 
padmakar reddy kadem
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
We are migrating the weblogic to websphere.I got the following exception for creating the ArrayDescriptor.
class com.orca.message.dao.MessageDAO - java.lang.ClassCastException: com.ibm.ws.rsadapter.jdbc.WSJdbcConnection incompatible with oracle.jdbc.OracleConnectionat 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());

here it is unable to create the arraydescriptor
 
Walter Bernstein
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Websphere gives you a websphere connection.

See for example http://www.hibernate.org/204.html for how to obtain the native connection.
 
padmakar reddy kadem
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply
We are using the connection pool in websphere.For getting the native connection i am not able to find the jar file required for the classes mentioned below.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic