Fixes are available
8.5.5.9: WebSphere Application Server V8.5.5 Fix Pack 9
8.5.5.10: WebSphere Application Server V8.5.5 Fix Pack 10
8.5.5.11: WebSphere Application Server V8.5.5 Fix Pack 11
8.5.5.12: WebSphere Application Server V8.5.5 Fix Pack 12
8.5.5.13: WebSphere Application Server V8.5.5 Fix Pack 13
8.5.5.14: WebSphere Application Server V8.5.5 Fix Pack 14
8.5.5.15: WebSphere Application Server V8.5.5 Fix Pack 15
8.5.5.17: WebSphere Application Server V8.5.5 Fix Pack 17
8.5.5.20: WebSphere Application Server V8.5.5.20
8.5.5.18: WebSphere Application Server V8.5.5 Fix Pack 18
8.5.5.19: WebSphere Application Server V8.5.5 Fix Pack 19
8.5.5.16: WebSphere Application Server V8.5.5 Fix Pack 16
8.5.5.21: WebSphere Application Server V8.5.5.21
APAR status
Closed as program error.
Error description
You may get a null value when trying to use OpenJPA's DelegatingConnection's unwrap() implementation. Looking at the contract for java.sql.Wrapper, which Connection implements, states: Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy. If the receiver implements the interface then the result is the receiver or a proxy for the receiver. If the receiver is a wrapper and the wrapped object implements the interface then the result is the wrapped object or a proxy for the wrapped object. Otherwise return the the result of calling unwrap recursively on the wrapped object or a proxy for that result. If the receiver is not a wrapper and does not implement the interface, then an SQLException is thrown. OpenJPA's DelegatingConnection's unwrap() implementation checks if the type passed as the unwrap call's argument is type-compatible with the delegate, and if so, returns the Delegate - that part is consistent with the contract. What's not consistent is when the delegate is not type-compatible with the argument - right now it returns null, when instead, as a wrapper object, it should be calling the delegate's unwrap() method and returning the result of that.
Local fix
Problem summary
**************************************************************** * USERS AFFECTED: All users of IBM WebSphere Application * * Server Liberty Profile * **************************************************************** * PROBLEM DESCRIPTION: EntityManager.unwrap() with a * * specific Connection implementation * * class returns null. * **************************************************************** * RECOMMENDATION: * **************************************************************** OpenJPA's connection wrapper doesn't properly adhere to Connection.unwrap() contract.
Problem conclusion
OpenJPA's DelegatingConnection class has been updated to properly adhere to the Connection.unwrap() contract, and will forward unwrap() invocations to the wrappered Connection for Class types it does not recognize. The fix for this APAR is currently targeted for inclusion in fix pack 8.5.5.9. Please refer to the Recommended Updates page for delivery information: http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
Temporary fix
Comments
APAR Information
APAR number
PI46699
Reported component name
LIBERTY PROFILE
Reported component ID
5724J0814
Reported release
855
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2015-08-11
Closed date
2015-11-19
Last modified date
2015-11-19
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
LIBERTY PROFILE
Fixed component ID
5724J0814
Applicable component levels
R850 PSY
UP
Document Information
Modified date:
28 April 2022