hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sangjin Lee (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-11831) isolated classloader does not handle packages that are split between system classpath and app classpath
Date Tue, 14 Apr 2015 16:38:13 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-11831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14494366#comment-14494366

Sangjin Lee commented on HADOOP-11831:

Also note that other class isolation solutions have similar issues, including OSGi and webapp
classloaders. OSGi would also fail miserably if one tries to split a system package.

> isolated classloader does not handle packages that are split between system classpath
and app classpath
> -------------------------------------------------------------------------------------------------------
>                 Key: HADOOP-11831
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11831
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 2.6.0
>            Reporter: Sangjin Lee
>            Assignee: Sangjin Lee
> We've seen a case where the isolated classloader fails if user code needs classes that
are part of the system classes package but are not included in the "system".
> One example we see is class org.w3c.dom.ElementTraversal:
> {noformat}
> java.lang.ClassNotFoundException: org.w3c.dom.ElementTraversal
> at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
> at org.apache.hadoop.util.ApplicationClassLoader.loadClass(ApplicationClassLoader.java:202)
> at org.apache.hadoop.util.ApplicationClassLoader.loadClass(ApplicationClassLoader.java:170)
> ... 47 more
> {noformat}
> The org.w3c.dom package is included in the system class packages as it is provided by
the JDK itself. However, this particular class (ElementTraversal) does not exist in the JDK.
In this case, it was included in a Xerces library the user brought. However, since the package
is declared as system classes, the application classloader will not look at the app classpath
to locate this class.

This message was sent by Atlassian JIRA

View raw message