tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Tomcat error: It is not available the ServletAction
Date Thu, 02 Apr 2009 15:12:05 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chuck,

On 4/2/2009 10:30 AM, Caldarale, Charles R wrote:
>> From: Christopher Schultz [mailto:chris@christopherschultz.net]
>> Subject: Re: Tomcat error: It is not available the ServletAction
>>
>> Apache Cocoon, for instance, ships with xercesImpl-2.9.1.jar
>> (actual Xerces) along with xml-apis-1.3.04.jar (the org.w3c.*,
>> org.xml.* and javax.xml.* interfaces, etc.) provided as part
>> of the webapp's libraries.
> 
> O.k., good to know. Have the class names changed since the version
> the OP is using was delivered? The various mailing lists are littered with
> stories of class conflict problems due to having multiple XML parser
> jars visible in a given classloader's path, especially on a 1.5 or newer
> JRE.

Xerces 1 implements somewhat older versions of the XML spec(s), while
Xerces 2 implements all the new stuff (which isn't all that different...
it's still XML 1.0). The implementation is completely different, but the
interfaces are largely the same names.

The XML APIs themselves have changed somewhat, and I think /that/ is
where the problems occur. It's not Xerces specific, of course, because
it's the org.w3c.*, org.xml.*, and javax.xml.* interfaces and classes
that have changed. IMO, Sun and the W3C really boned the XML API path.

I think the reason Xerces works within the application's ClassLoader is
because of the backward way that webapp ClassLoaders work (load local
before parent). When Xerces is/is not available to the boot classloader
as well as the main classloader, that's when problems occur (which is
why you need to bundle the parser with Tomcat 5.5 on a 1.4-level JVM).

> Note that the Tomcat 5.5 compatibility package for running with a 
> 1.4 JRE consists primarily of the Xerces implementation and XML API 
> definition jars, which are built-in to 1.5; leaving the
> compatibility package installed when switching from a 1.4 to a 1.5
> JRE definitely does cause problems.

Since this is at the top-level (i.e. not using a webapp-style
ClassLoader), confusion can occur when versions are not matched (and
they are almost always mismatched).

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAknU1cUACgkQ9CaO5/Lv0PBefACfXYT1GHDzwoV1xgek0hXqZLIn
00wAn0bXFF4GysDxj+uo1/NiXqmV6WcG
=tNYW
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message