1 Reply Latest reply on May 30, 2003 9:10 PM by jmboone

    Class Loader Problem...Any thoughts!

    jmboone

      Hi,

      I have wrapped the Sun CIM Object manager in a SAR, and have been happily using it in JBoss 3.0.4. Now I want to upgrade to JBoss 3.1.2. When I try to deploy my SAR, I cause JBoss major heartburn!! After looking over the source code, I can see the Sun guys are creating a class as such "public class DynClassLoader extends URLClassLoader" and attempting to load classes. From the error message, I am astute enought to know that JBoss doesn't like him creating and trying to use a custom class loader, but have not idea how to correct the problem. All I know is 1) everything worked fine under 3.0.4 but doesn't work with 3.2.1 and 2) there is a custom class loader instantiated and used. Beyond that, I am class loader ignorant. How do I make this thing work? Please help!!!


      2003-05-27 21:28:27,939 INFO [org.jboss.deployment.MainDeployer] Starting deployment of package: file:/C:/Java/jboss-3.2.1_tomcat-4.1.24/server/asmc/deploy/CIMOM-1.0.sar
      2003-05-27 21:28:29,662 WARN [org.jboss.system.ServiceController] Problem starting service Metrics:Name=CIM Object Manager
      java.security.AccessControlException: access denied (java.lang.RuntimePermission setContextClassLoader)
      at java.security.AccessControlContext.checkPermission(AccessControlContext.java:272)
      at java.security.AccessController.checkPermission(AccessController.java:399)
      at java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
      ....

        • 1. Re: Class Loader Problem...Any thoughts!
          jmboone

          OK, I will answer my own question. It seems the issue has nothing to do with the class loader. Instead, it was the java.security.policy file, or should I say, the absense of one. One of my peers found what I should have known. That is, if you don't specify a security policy file, you get the default one and it seems the default one didn't like what my code was doing. When I specified the server.policy file (which is wide open) contained in the conf directory, everything worked great. So, on to the next problem.....I hope this helps someone someday since the answers seem to be few and far in-between in the JBoss forums...

          Cheers...