This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Websphere and the fly likes classcast exception only with websphere server not for weblogic Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "classcast exception only with websphere server not for weblogic" Watch "classcast exception only with websphere server not for weblogic" New topic
Author

classcast exception only with websphere server not for weblogic

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.
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

Joined: Dec 19, 2007
Posts: 57
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

Joined: Dec 24, 2007
Posts: 10
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: classcast exception only with websphere server not for weblogic
 
Similar Threads
classcast exception for creating Arraydescriptor only for websphere
ArrayDescriptor - SqlException
Class Cast exception in oracle.sql.ArrayDescriptor
classcast exception while creating array descriptor for oracle
Apache Commons DBCP connection object problem