0 Replies Latest reply on May 20, 2002 4:29 AM by sherpa

    MBeanServerImpl throws RuntimeException when using server.po

    sherpa

      Hi,

      I'm trying to get my jboss setup running with java.security.manager using an adapted server.policy file
      When granting everything AllPermission things go fine, however when narrowing down the security permissions to e.g. my jboss installation directory by adding a codebase to the grant it keeps throwing a RuntimeException in operation addClassLoader? doesnt make sense to me since it has AllPermission...

      Setup: win2000, JBoss-2.4.6_Tomcat-4.0.3

      ========== server.policy =================
      // JAVA permissions

      // These permissions apply to javac
      grant codeBase "file:${java.home}/lib/-" {
      permission java.security.AllPermission;
      };

      // These permissions apply to all shared system extensions
      grant codeBase "file:${java.home}/jre/lib/ext/-" {
      permission java.security.AllPermission;
      };

      // These permissions apply to javac when ${java.home] points at $JAVA_HOME/jre
      grant codeBase "file:${java.home}/../lib/-" {
      permission java.security.AllPermission;
      };

      // These permissions apply to all shared system extensions when
      // ${java.home} points at $JAVA_HOME/jre
      grant codeBase "file:${java.home}/lib/ext/-" {
      permission java.security.AllPermission;
      };

      // JBOSS permissions
      grant codeBase "file:E:/tools/JBoss-2.4.6_Tomcat-4.0.3/-" {
      permission java.security.AllPermission;
      };


      ========== stacktrace ====================
      [ERROR,ContainerFactory] DeploymentError
      javax.management.RuntimeMBeanException: RuntimeException thrown in operation add
      ClassLoader
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:16
      40)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
      23)
      at org.jboss.util.MBeanProxy.invoke(MBeanProxy.java:79)
      at org.jboss.proxy.ProxyCompiler$Runtime.invoke(ProxyCompiler.java:74)
      at org.jboss.web.WebServiceMBean$Proxy.addClassLoader(Unknown Source)
      at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:366)
      at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:307)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:16
      28)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
      23)
      at org.jboss.deployment.J2eeDeployer.startModules(J2eeDeployer.java:487)

      at org.jboss.deployment.J2eeDeployer.startApplication(J2eeDeployer.java:
      459)
      at org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer.java:190)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:16
      28)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
      23)
      at org.jboss.deployment.AutoDeployer.deploy(AutoDeployer.java:395)
      at org.jboss.deployment.AutoDeployer.run(AutoDeployer.java:233)
      at java.lang.Thread.run(Thread.java:484)

      =============================================

      any help would be great...

      ps maybe somebody could post/contribute a somewhat more secure server.policy file instead of the one included now to use with the jboss distribution (like tomcat/catalina is doing for their jsp/servlet container) ?