"java.lang.ClassCastException: java.lang.Boolean cannot be cast to oracle.ucp.jdbc.oracle.OracleConnectionAffinityContext" Error When Calling Getconnectionaffinitycontext() Method in Class SessionAffinityCallback or XAAffinityCallback in a Grid Link DS
(Doc ID 2284500.1)
Last updated on SEPTEMBER 29, 2023
Applies to:
Oracle WebLogic Server - Version 12.1.3.0.0 and laterInformation in this document applies to any platform.
Symptoms
When calling getConnectionAffinityContext in class weblogic/jdbc/common/internal/SessionAffinityCallback or weblogic/jdbc/common/internal/XAAffinityCallback, the returning type for the method is not consistent.
- if there is an exception thrown in the method, it returns a Boolean object instead of the expected null object
- otherwise, it returns oracle.ucp.jdbc.oracle.OracleConnectionAffinityContext which is the expected value
Eventually, when an exception is thrown, it causes the additional exception below as that is not expected by the application. The excepted return type is either a null object or oracle.ucp.jdbc.oracle.OracleConnectionAffinityContext object.
Changes
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Changes |
Cause |
Solution |
References |