ClassCastException occurs when using WebSphere Application Server data source and Oracle-specific data types
 Technote (FAQ)
 
Problem
When obtaining a connection to an Oracle® 8.1.7 database from a WebSphere® Application Server 4.0.x data source and using Oracle-specific data types such as StructDescriptor or ArrayDescriptor, a ClassCastException is issued.

There is no problem using the Oracle-specific data types when the connection is obtained using the DriverManager.getConnection() method. Oracle has acknowledged that this is a bug in the Oracle JDBC™ drivers. WebSphere cannot fix the problem because these data types are not part of the JDBC specification.
 
Solution
Obtain the connection using the DriverManager.getConnection() method to use Oracle-specific data types. This means that WebSphere connection pooling (that is, data sources) is not being used.

If a WebSphere data source is needed, do not use the Oracle-specific data types.

 
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > DB Connections/Connection Pooling
Operating system(s): HP-UX
Software version: 4.0
Software edition:
Reference #: 1052722
IBM Group: Software Group
Modified date: Sep 7, 2004