I recently upgraded my app (which uses WebSphere) to use ojdbc8. Here are lines where I unwrap a connection:
import java.sql.Connection;
import oracle.jdbc.OracleConnection;
// some processing here
public void unwrapAndProcess(Connection con) {
OracleConnection conn = con.unwrap(OracleConnection.class);
StructDescriptor desc = StructDescriptor.createDescriptor("DATAVAL", conn); // exception here
// more processing here
}
Suddenly, I am getting the following issue on the line where I call .createDescriptor.
java.lang.RuntimeException: java.sql.SQLFeatureNotSupportedException: DSRA9130: Operation is not permitted by the application server: unwrap
I am not sure of the real cause as to why I am getting this issue or what can be done to rectify.
Here is a snippet of the exact stacktrace:
java.lang.RuntimeException: java.sql.SQLFeatureNotSupportedException: DSRA9130: Operation is not permitted by the application server: unwrap
at com.ibm.ws.rsadapter.jdbc.WSJdbcWrapper.invoke(WSJdbcWrapper.java:259)
at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.invoke(WSJdbcConnection.java:5512)
at com.sun.proxy.$Proxy136.unwrap(Unknown Source)
at oracle.sql.StructDescriptor.isValidObject(StructDescriptor.java:90)
at oracle.sql.StructDescriptor.createDescriptor(StructDescriptor.java:115)
at oracle.sql.StructDescriptor.createDescriptor(StructDescriptor.java:79)
at (class & line where StructDescriptor.createDescriptor is used)