2 Replies Latest reply on Nov 21, 2005 4:27 PM by jborn2

    Need help resolving java.security.AccessControlException dur

    dnatobyte

      I'm currently running Tomcat 5.0.28 and am receiving the following stack trace during startup

      **************
      July 15, 2005 9:09:45 PM org.apache.commons.modeler.Registry registerComponent

      SEVERE: Error registering Catalina:type=RequestProcessor,worker=http-8080,name=HttpRequest2

      java.security.AccessControlException: Access denied (mx4j.server.MBeanTrustPermission register): MBean class org.apache.commons.modeler.BaseModelMBean is not trusted for registration

      at mx4j.server.interceptor.SecurityMBeanServerInterceptor.checkTrustRegistration(SecurityMBeanServerInterceptor.java:156)

      at mx4j.server.interceptor.SecurityMBeanServerInterceptor.registration(SecurityMBeanServerInterceptor.java:116)

      at mx4j.server.interceptor.DefaultMBeanServerInterceptor.registration(DefaultMBeanServerInterceptor.java:113)

      at mx4j.server.interceptor.DefaultMBeanServerInterceptor.registration(DefaultMBeanServerInterceptor.java:113)

      at mx4j.server.interceptor.ContextClassLoaderMBeanServerInterceptor.registration(ContextClassLoaderMBeanServerInterceptor.java:108)

      at mx4j.server.MBeanServerImpl.registerImpl(MBeanServerImpl.java:1051)

      at mx4j.server.MBeanServerImpl.registerMBeanImpl(MBeanServerImpl.java:1002)

      at mx4j.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:978)

      at org.apache.commons.modeler.Registry.registerComponent(Registry.java:871)

      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.init(Http11Protocol.java:670)

      at org.apache.tomcat.util.net.TcpWorkerThread.getInitData(PoolTcpEndpoint.java:527)

      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:672)

      at java.lang.Thread.run(Thread.java:534)

      **************

      It appears to be a policy issue, but as far as I know no one has manipulated the default policy settings in catalina.policy.

      Has anyone else observed this specific security exception and if so, was there a solution to the problem.

      Thanks in advance,
      Jeff Barton

        • 1. Re: Need help resolving java.security.AccessControlException
          jborn2

          I just started to get this error also.

          I would love an explaination of why. And how to get around. I've tried to grant all permission. Tried not running with security tried with default security. All give me the same message:

          20:01:34,757 ERROR [org.apache.commons.modeler.Registry] Error registering Catalina:j2eeType=WebModule,name=//localhost/tunnel,J2EEApplication=none,J2EEServer=none
          java.security.AccessControlException: Access denied (mx4j.server.MBeanTrustPermission register): MBean class org.apache.commons.modeler.BaseModelMBean is not trusted for registration

          Can anyone help me past this? If not can you point me towards a forum that maybe able to help me out?

          Thanks for the info

          • 2. Re: Need help resolving java.security.AccessControlException
            jborn2

            Finally dawned on me what the problem was. Since I'm not using the security model under Tomcat I'm using what is provided by Java. It uses a file in JRE_HOME/lib/security called java.policy.

            Edit and add the following:

            grant {
            permission mx4j.server.MBeanTrustPermission "register";
            };

            Hope that helps,

            jb