On Fri, Mar 24, 2006 at 01:10:40PM +0100, Markus Sch?nhaber wrote: > 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?
Without a security manager, I still get problems. But they are different problems. e.g. Caused by: java.security.AccessControlException: access denied (java.util.logging.LoggingPermission control) ... Exception in thread "ContainerBackgroundProcessor[StandardEngine[Catalina]]" java.security.AccessControlException: access denied (java.lang.RuntimePermission setContextClassLoader) I'm not sure what is triggering this exception. But it's by-passed if I set a security policy. > 2. Do CATALINE_HOME and CATALINA_BASE point to the same directory? If not, > the > setting above may be without effect. > I haven't changed either of these variables. They are both at default. Thanks, Gary > Regards > mks > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- Gary Pennington Solaris Kernel Development, Sun Microsystems [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]