Fixes are available
PI85892:classcastexceptions while doing a naming lookup for beanmanger
8.0.0.14: WebSphere Application Server V8.0 Fix Pack 14
8.5.5.13: WebSphere Application Server V8.5.5 Fix Pack 13
8.0.0.15: WebSphere Application Server V8.0 Fix Pack 15
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
ClassCastExceptions while doing a naming lookup for beanManger. ### 8/4/17 2:29:32:944 CDT] 000000c5 webapp E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet Error]-[mvc-dispatcher]: java.lang.NoClassDefFoundError: Caused by: java.lang.ClassCastException: javax.naming.Reference incompatible with javax.enterprise.inject.spi.BeanManager ###
Local fix
Problem summary
**************************************************************** * USERS AFFECTED: All users of IBM WebSphere Application * * Server * * who do not use CDI but use a third party * * library that uses jndi to access CDI such * * as * * jersey. * **************************************************************** * PROBLEM DESCRIPTION: JNDI is returning a Reference object * * instead of throwing a NamingException * * when CDI is disabled, resulting in the * * following exception: * * java.lang.ClassCastException: * * javax.naming.Reference incompatible * * with * * javax.enterprise.inject.spi.BeanManager * * * **************************************************************** * RECOMMENDATION: * **************************************************************** An exception was frequently hit during normal operation was replaced with a logging message. However this change resulted in JNDI returning Reference objects instead of a NamingException when looking up a BeanManager while CDI is disabled. Third party libraries, such as Jersey, used the presence of a NamingException to determine if CDI was enabled or disabled. Therefore without the exception they incorrectly assumed CDI was enabled, leading to exceptions. To fix this we reverted the change and re-introduced the exceptions.
Problem conclusion
The fix for this APAR is currently targeted for inclusion in fix pack 8.5.5.13. Please refer to the Recommended Updates page for delivery information: http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980 An interim fix is available at https://www- 945.ibm.com/support/fixcentral/swg/selectFixes? parent=ibm%2FWebSphere&product=ibm/WebSphere/WebSphere+Applicati on+Server&release=All&platform=All&function=fixId&fixids=8.5.5.1 2-WS-WASProd-IFPI85892&includeSupersedes=0
Temporary fix
Comments
APAR Information
APAR number
PI85892
Reported component name
WEBSPHERE APP S
Reported component ID
5724J0800
Reported release
850
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2017-08-14
Closed date
2017-09-26
Last modified date
2017-09-26
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
WEBSPHERE APP S
Fixed component ID
5724J0800
Applicable component levels
R850 PSY
UP
Document Information
Modified date:
28 April 2022