"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 FEBRUARY 20, 2019
Applies to:Oracle WebLogic Server - Version 220.127.116.11.0 and later
Information in this document applies to any platform.
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.
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