You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Openliberty, this PreparedStatement is a com.ibm.ws.rsadapter.jdbc.v43.WSJdbc43PreparedStatement that wrapps the OraclePreparedStatement which leads to "java.lang.ClassCastException: class com.ibm.ws.rsadapter.jdbc.v43.WSJdbc43PreparedStatement cannot be cast to class oracle.jdbc.OraclePreparedStatement "
To Reproduce
Steps/resources to reproduce the behavior:
JDBC driver provider/version (it should be useful if bug is related with some "specific" datatype e.g. JSON): com.oracle.database.jdbc:ojdbc11:23.2.0.0
Expected behavior
Statements gets unwrapped and no ClassCastException will be thrown.
Additional context
The problem occured within Openliberty 23.0.0.12. I can try to create an example to reproduce this behaviour. I can try to create an example if needed.
The text was updated successfully, but these errors were encountered:
Describe the bug
In a container environment, connections, statements, .. may be wrapped. So casting to the expected class will fail.
Example: https://github.com/eclipse-ee4j/eclipselink/blob/4.0.2/foundation/org.eclipse.persistence.oracle/src/main/java/org/eclipse/persistence/platform/database/oracle/Oracle9Platform.java#L178
In Openliberty, this PreparedStatement is a com.ibm.ws.rsadapter.jdbc.v43.WSJdbc43PreparedStatement that wrapps the OraclePreparedStatement which leads to "java.lang.ClassCastException: class com.ibm.ws.rsadapter.jdbc.v43.WSJdbc43PreparedStatement cannot be cast to class oracle.jdbc.OraclePreparedStatement "
To Reproduce
Steps/resources to reproduce the behavior:
persistence.xml
settings or related system properties (in case of JPA): Nothing specialExpected behavior
Statements gets unwrapped and no ClassCastException will be thrown.
Additional context
The problem occured within Openliberty 23.0.0.12. I can try to create an example to reproduce this behaviour. I can try to create an example if needed.
The text was updated successfully, but these errors were encountered: