We have WAS JDBC Connection pool API's implemented in our code and was working till the point we upgrade WAS6 to WAS7.
Post upgrade Issue we are facing :
PreparedStatement l_stmt : object is fetched from WAS 7 datasource connection object.
Observed Value when inspected the l_stmt object from eclipse :
----------------------------------------------------------------------
l_stmt.pstmtimpl = oracle.jdbc.driver.OraclePreparedStatementWrapper (Returned when connection is fetched from IBM Datasource)
I have a piece of code which tries to create instance of OraclePreparedStatementWrapper class from ojdb6.jar,below is the source snippet.
com.ibm.websphere.rsadapter.WSCallHelper.jdbcCall(null, l_stmt, "setFixedCHAR", new Object[]{new Integer(1), p_txn_key}, new Class[]{Integer.TYPE, String.class} );
Above execution internally (IBM WAS Jars) calls OraclePreparedStatementWrapper based on the object it received from datasource.
I am getting below error :
------------------------
Caused by: java.lang.IllegalAccessException: Class com.ibm.ws.rsadapter.jdbc.WSJdbcUtil can not access a member of class oracle.jdbc.driver.OraclePreparedStatementWrapper with modifiers "public"
at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:77)
at java.lang.reflect.Method.invoke(Method.java:590)
at com.ibm.ws.rsadapter.jdbc.WSJdbcUtil.call(WSJdbcUtil.java:528)
It is observed in ojdbc6.jar OraclePreparedStatementWrapper has "default" access modifier. Due to which i am getting above exception.
Please let me know if there is any work around which will help me overcome above error.