PQ72057: SRVE0026E: [SERVLET ERROR]-[JSP 1.2 PROCESSOR]:JAVA.LANG.CLASSC ASTEXCEPTION, COM.TEST.APP1._APP1SESSION1_STUB, CLASSLOADER LEAK | |||||||||||||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||
APAR status Closed as program error. Error description Cust is running WAS 5.0 on Win2K w/SP3. Trying to run two Apps on the same App Server. Server Config : Appl Classloader Policy : Multiple, Appl Class Loading Mode : Parent First. Appl App1: Modular, Appl App2 : Modular. Problem def. - Appl 1 and 2 contains their own War and EJB JAR files. Appl 2 uses a remote session interface defined in Appl 1 to obtain some info. Deploy both applications App1.ear and App2.ear to WAS or to the Internal WSAD test container. Scenario (a) Scenario [a] will always lead to a class cast exception as soon as a call to App1Jsp.jsp to is made while scenario [b] will never cause any problems. Conclusion There seems to be a classloader "leak" deployments work without problems when the Application classloader policy is changed to Single Work around Always follow scenario [b] Use Classloader Policy : Single (from L3)Local fix 4.a.1) Stop and Start both Applications 4.a.2) Start a web browser and invoke App2Jsp.jsp 4.a.3) Start another web browser instance and invoke App1Jsp.jsp This will cause a class cast exception Scenario (b) 4.b.1) Stop and Start both Applications 4.b.2) Start a web browser and invoke App1Jsp.jsp 4.b.3) Start another web browser instance and invokeApp2Jsp.jsp No Problem doing it this way.Problem summary **************************************************************** * USERS AFFECTED: All users of WebSphere Application Server * * release 5.0 and 5.0.1 * **************************************************************** * PROBLEM DESCRIPTION: A ClassCastException is thrown when * * a cached EJB stub is returned. * **************************************************************** * RECOMMENDATION: * **************************************************************** The following error message is received: SRVE0026E: SERVLET ERROR - JSP 1.2 PROCESSOR : JAVA.LANG.CLASSCASTEXCEPTION, COM.TEST.APP1._APP1SESSION1_STUB In this problem there are two EJBs loaded by two different classloaders. In the failing scenario an EJB2 session bean wants to invoke a method in an EJB1 session bean, which means EJB2 must first get the home interface for EJB1 and then create an EJB1 instance. This all works, however the ORB's 'tieToStub' cache ends up containing an entry for an EJB1 session bean stub that has been loaded by the EJB2 classloader. A subsequent attempt to create another EJB1 session bean, this time from an app running under EJB1's classloader, is getting returned the cached (EJB2-loaded) stub. This is invalid and results in a ClassCastException. The problem can be easily fixed by not caching the stub in the first place, but of course the cache is there for performance and simply removing it would have a big penalty.Problem conclusion This is not a WebSphere defect, but a bug in base ORB and is fixed in defect: SOV 61819 .Temporary fix Comments
APAR is sysrouted FROM one or more of the following: APAR is sysrouted TO one or more of the following: Modules/Macros
Publications Referenced
|
Product categories: Software > Application Servers >
Distributed Application & Web Servers > WebSphere Application
Server > General
Operating system(s):
Software version: 00W
Software edition:
Reference #: PQ72057
IBM Group: Software Group
Modified date: Apr 12, 2004
(C) Copyright IBM Corporation 2000, 2008. All Rights Reserved.