Hi -
I've been trying to solve a problem for quite some time now and I can't seem to find the solution. Basically I have a servlet running under tomcat (5.5.17) which is acting as an RMI client, looking up to a EJB running under jboss (3.2.5). I can successfully connect to the EJB via a stand-alone application but when I try and connect to the EJB via a servlet I run into problems. Basically the stack trace is as follows: javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.security.AccessControlException: access denied (java.io.FilePermission \C:\Program Files\Apache\apache-tomcat-5.5.17\common\lib\jbossall-client.jar read)] at javax.naming.spi.NamingManager.getInitialContext(Unknown Source) at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source) at javax.naming.InitialContext.init(Unknown Source) at javax.naming.InitialContext.<init>(Unknown Source) at com.semantico.depp.drm.manager.impl.AdobeDRMManager.applyPolicy(AdobeDRMManager.java:326) at com.semantico.depp.reader.servlets.SendDRMFile.doGet(SendDRMFile.java:118) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.semantico.depp.acs.filters.authentication.CredentialsGatherer.doHttpFilter(CredentialsGatherer.java:103) at com.semantico.depp.acs.filters.HTTPFilter.doFilter(HTTPFilter.java:68) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Unknown Source) Caused by: java.security.AccessControlException: access denied (java.io.FilePermission \C:\Program Files\Apache\apache-tomcat-5.5.17\common\lib\jbossall-client.jar read) at java.security.AccessControlContext.checkPermission(Unknown Source) at java.security.AccessController.checkPermission(Unknown Source) at java.lang.SecurityManager.checkPermission(Unknown Source) at java.net.URLClassLoader$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.getPermissions(Unknown Source) at java.security.SecureClassLoader.getProtectionDomain(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$100(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1339) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at com.sun.naming.internal.VersionHelper12.loadClass(Unknown Source) As you can see the issue seems to be a FilePermissions one, but I don't really understand why. Firstly, I'm not running tomcat with the security manager (or atleast I don't think I am - I am running it through the eclipse plugin and I have the 'launch with security manager' setting unchecked). Secondly, before I got this stack trace I had not included the jbossall-client.jar file within the common/lib directory and the stack trace gave a ClassNotFound exception as it couldn't find the implementation for the JNP interface. Once I included the jbossall-client.jar file within the common/lib dir then the class not found exception seemed to be resolved. So tomcat can obviously read the jbossall-client.jar file in order to discover that the org.jnp.interfaces.NamingContextFactory is implmented within it. It's probably obvious from this post that this is my first encounter with RMI and that I am very confused. Can anyone offer any pointers as to what the problem may be, and how I can resolve it? Many thanks, Anil. -- View this message in context: http://www.nabble.com/Servlet-RMI-problem-File-Permission-tf2547074.html#a7098270 Sent from the Tomcat - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]