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..
[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)
[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?
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.