We are facing a strange problem with Websphere Application Server Data Source.
Environment:
- Websphere Application Server (6.1)
- Linux
- Liferay Portal (5.2)
- Oracle 9i
- Hibernate 3.0
We have datasource deployed in Application server referencing ODBC14.jar
Hibernate Configuration for Datasource:
<property name="connection.datasource">jdbc/appDB</property>
<property name="jndi.class">com.ibm.websphere.naming.WsnInitialContextFactory</property>
<property name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</property>
<property name="connection.autocommit">false</property>
We are getting following exception:
Caused by: java.sql.SQLException: DSRA8101E: DataSource class cannot be used as one-phase: ClassCastException: oracle.jdbc.pool.OracleConnectionPoolDataSource incompatible with javax.sql.ConnectionPoolDataSource at com.ibm.ws.rsadapter.AdapterUtil.toSQLException(AdapterUtil.java:1375) at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:462) at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:418) at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:69) at org.hibernate.jdbc.ConnectionManager.openConnection
We've tried the following workaround Came to know classes12.jar was there in WEB-INF/lib Which has ORACLE Driver which can cause Class Loading conflict with Shared/apps/lib ODBC14.jar
So removed classes12.jar from Web application Lib and redeployed application and restarted, but got same error again. Any idea on how to resolve this?