Bug#594913: javax.activation needs to be listed in the system classes

Bob Feldbauer bobfeldbauer at worldlingo.com
Mon Aug 30 17:15:50 UTC 2010


Package: jetty
Version: 6.1.24-6


(*Note: This bug is fixed upstream in version 6.1.25)

As per JETTY-1226 (http://jira.codehaus.org/browse/JETTY-1226):

Jetty includes "javax.xml" in the list of packages that the 
WebAppClassLoader always consults the parent first (I'll call such 
packages as "pass-through" packages.) In JRE6, rt.jar now contains 
javax.xml.soap.AttachmentPart (a part of SAAJ API), which refers to 
javax.activation.DataHandler.

However, "javax.activation" is not listed as a pass-through package. As 
a result, if the web application directly references DataHandler and 
also uses SAAJ, it'll result in a classloader constraint violation. This 
is the root cause of JETTY-420.

Unfortunately, applications that need to run on Java5 needs to bundle 
activation.jar and SAAJ, thus there's nothing apps can do to avoid this bug.

In general, everything referenced by pass-through packages need to be 
also listed as a pass-through packages to avoid such a constraint violation.

In this case, the fix is to add "javax.activation" to the list of system 
classes. This definition is given in WebbAppContext._systemClasses.





More information about the pkg-java-maintainers mailing list