|
Problem |
Using WebSphere Application Server 4.0.x, when doing a
Java Naming and Directory Interface™ (JNDI) lookup of an Oracle® data
source and casting it as javax.sql.DataSource like this:
ds =(javax.sql.DataSource)ctx.lookup("jdbc/DataSourceName");
"ClassCastException: com.ibm.ejs.cm.JDBC1PhaseRF" is thrown. |
|
Cause |
This problem is caused by the classes12.zip file existing
in the ear file directory under WebSphere/AppServer/installedApps. The
problem might also occur if any other JDBC™, SQL, or connection pooling
classes (such as WebSphere's cm.jar, j2ee.jar or another JDBC driver) are
included in the ear file. |
|
Solution |
To resolve the problem:
- Remove classes12.zip from the ear file and place it somewhere else in
the directory structure.
- Ensure that the JDBC Provider definition is configured with the
correct location of classes12.zip.
- Restart the application. The problem should no longer occur.
|
|