[jboss-dev] M4 branched, AS trunk open

Brian Stansberry brian.stansberry at redhat.com
Thu Jul 22 11:52:41 EDT 2010


Thanks. I created https://jira.jboss.org/browse/JBAS-8237 which is a 
child of a container JIRA to clean up all the failures: 
https://jira.jboss.org/browse/JBAS-8236

On 7/22/10 10:30 AM, Ales Justin wrote:
> This one
> *http://hudson.qa.jboss.com/hudson/view/JBoss%20AS/job/JBoss-AS-6.0.x-testSuite-sun16/lastCompletedBuild/testReport/org.jboss.test.isolation.test/JavaClassIsolationUnitTestCase/testJavaClassIsNotLoadedFromIsolatedClassLoader/
> looks somehow expected, but the behavior changed a bit.
>
> We explicitly build "illegal" resources
>
>        <!-- build test-java-class-isolation.sar -->
>        <mkdir dir="${build.resources}/isolation/java/org/jboss/test"/>
>        <copy file="${build.classes}/org/jboss/test/isolation/mbean/JavaClassIsolationMBean.class"
>              tofile="${build.resources}/isolation/java/org/jboss/test/Test.class"/>
>
>        <mkdir dir="${build.resources}/isolation/java/rmi/registry"/>
>        <copy file="${build.classes}/org/jboss/test/isolation/mbean/JavaClassIsolationMBean.class"
>              tofile="${build.resources}/isolation/java/rmi/registry/Registry.class"/>
>
>        <jar destfile="${build.lib}/test-java-class-isolation.sar">
>           <fileset dir="${build.classes}">
>              <include name="org/jboss/test/isolation/mbean/**"/>
>           </fileset>
>           <fileset dir="${build.resources}/isolation/">
>              <include name="META-INF/*.xml"/>
>              <include name="java/**"/>
>           </fileset>
>        </jar>
>
> only to test them here
>
>     public void test() throws Exception
>     {
>        // Use our scoped classloader
>        ClassLoader cl = getClass().getClassLoader();
>
>        // Should be able to find the class as a resource
>        URL resource = cl.getResource("java/org/jboss/test/Test.class");
>        if (resource == null)
>           throw new RuntimeException("Unable to find resource java/org/jboss/test/Test.class");
>
>        // Should not be able to load the resource
>        try
>        {
>           cl.loadClass("java.org.jboss.test.Test");
>           throw new RuntimeException("Should not be able to load class");
>        }
>        catch (ClassNotFoundException expected) // HERE --- we get security exception now instead
>        {
>           // Should not be able to load it
>           log.info("Got expected exception", expected);
>        }
>
>        // Should be able to load the resgistry class even though it is in our deployment
>        cl.loadClass("java.rmi.registry.Registry");
>     }
>
> resulting in
>
> DEPLOYMENTS IN ERROR:
>    Deployment "vfs:///qa/services/hudson/hudson_workspace/workspace/JBoss-AS-6.0.x-testSuite-sun16/JBossAS/testsuite/output/lib/test-java-class-isolation.sar" is in error due to the following reason(s): java.lang.SecurityException: Prohibited package name: java.org.jboss.test
>
> The question is what was changed in our CL layer.:-)


-- 
Brian Stansberry
Lead, AS Clustering
JBoss by Red Hat


More information about the jboss-development mailing list