Gary Pennington wrote:
> If I invoke Tomcat with the following additional options, I can make my
> servlet/RMI client deploy:
>
> -Djava.rmi.server.codebase="http://webserver/builds2/garypen/jars/jscmc.jar
> http://webserver/builds2/garypen/jars/jscma.jar";
>
> The application executes fine until it tries to make an RMI call to the
> server which involves transferring an object from the client to the server.
> At this point, if I make sure that the client jar file is in my server's
> class path then everything works fine, since the server loads the local
> class definition. However, this is not ideal and I don't want to have to
> load client jar files on my server. Rather, I would like to use the RMI
> capability to load the class definition from my client. This is the problem
> I'm trying to solve.
>
> I modified my catalina policy file so that:
>
> //Gary's nasty hack to get round all security :)
> grant codeBase "file:${catalina.home}/webapps/repository/-" {
>     permission java.security.AllPermission;
> };
>
[...]
>
> Caused by: java.rmi.UnmarshalException: error unmarshalling arguments;
> nested exception is: java.lang.ClassNotFoundException: access to class
> loader denied <blah, bla, blah...>
> Caused by: java.security.AccessControlException: access denied
> (java.io.FilePermission
> /home/garypen/dev/dist/apache-tomcat-5.5.15/webapps/repository/WEB-INF/clas
>ses/- read)

I don't have much experience regarding RMI so I won't be of much help if it's 
a RMI-specific problem. But two points come to my mind:
1. You did make sure everything works as expected if you start Tomcat without 
security manager?
2. Do CATALINE_HOME and CATALINA_BASE point to the same directory? If not, the 
setting above may be without effect.

Regards
  mks


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to