1 Reply Latest reply on Oct 21, 2002 12:53 PM by juha

    MainDeployer security issues

    sascha

      hi,

      i try to use the JMX ant task contained in jbossjmx-ant.jar to connect to the jboss instance and use the MainDeployer mbean to undeploy some EAR archives. that worked fine but trying to deploy another EAR produces the following client side stack trace..

      conditional-deploy:
      [jmx] java.rmi.UnmarshalException: Error unmarshaling return; nested exception is:
      [jmx] java.lang.ClassNotFoundException: org.jboss.deployment.DeploymentException (no security manager: RMI class loader disabled)
      [jmx] at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:217)
      [jmx] at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
      [jmx] at org.jboss.jmx.adaptor.rmi.RMIAdaptorImpl_Stub.invoke(Unknown Source)
      ...
      org.apache.tools.ant.Main.main(Main.java:235)
      [jmx] Caused by: java.lang.ClassNotFoundException: org.jboss.deployment.DeploymentException (no security manager: RMI class loader disabled)
      ...
      [jmx] ... 24 more

      the client side classloader has no copy of the DeploymentException class, but i don't want that anyway. it seems there is some security constraint on using the deploy(java.net.URL) method of the MainDeployer. undeploy(java.net.URL) and isDeployed are already used without problems in the ant build run.
      how can i disable these security constraints on deploy?

        • 1. Re: MainDeployer security issues

          you need to either add the DeploymentException.class to your client side classpath or setup the RMISecurityManager to allow dynamic classloading of that class from a remote location.

          I recommend the first approach.