PQ76837 - CLASSCASTEXCEPTION ON V5.0.1 WHEN
WEBSERVICES INVOKES JSP/SERVLET
Downloadable files
Abstract
In WebSphere® Application Server V5.0.1, a Web Services
application fails with ClassCastException. This application worked fine on
V4.0.3.
Download Description
USERS AFFECTED: WebSphere Application Server Developers using SOAP and
Xerces.
PROBLEM DESCRIPTION:
Apache SOAP is not getting the required version of the Xerces parser that
is shipped with WebSphere Application Server 5.0.1 and 5.0.2.
A user can receive a ClassCastException when Apache SOAP is attempting to
locate a Xerces parser, depending on the classpath. An example stack trace
is:
WebGroup E SRVE0026E: Servlet Error - :
java.lang.ExceptionInInitializerError: java.lang.ClassCastException:
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
at javax.xml.parsers.DocumentBuilderFactory.newInstance (Unknown Source)
at
org.apache.soap.util.xml.XMLParserUtils.refreshDocumentBuilderFactory(Unknown
Source)
at org.apache.soap.util.xml.XMLParserUtils.<clinit> (Unknown
Source)
PROBLEM CONCLUSION:
The code was modified so that Apache SOAP will use a ParserFactory to find
the correct Xerces parser, irrespective of the classpath.
Prerequisites
WebSphere Application Server Fix Pack 1 or Fix Pack 2 (V5.0.1 or
V5.0.2)
Product categories: Software > Application Servers >
Distributed Application & Web Servers > WebSphere Application
Server > Web Services (for example: SOAP or UDDI or WSGW or WSIF)
Operating system(s): Windows
Software version: 5.0.2
Software edition: Reference #: 4005129
IBM Group: Software Group
Modified date: Aug 17, 2004
(C) Copyright IBM Corporation 2000, 2009. All Rights
Reserved.