DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7082>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7082 Calling an RMI Server from a servlet produces stack trace [EMAIL PROTECTED] changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Additional Comments From [EMAIL PROTECTED] 2002-08-28 12:29 ------- Bug in WebappClassLoader where external repositories is now fixed (4.1.10) and allows RMI with remote objects to work. This is actually better than setting 'java.rmi.server.codebase', because it will only affect the one webapp. The following code should be used to set up the remote repository: // This stuff is for Tomcat 4.1.10 and above. Method m = null; try { ClassLoader cl = StaffPlannerServer.class.getClassLoader(); Class clc = cl.getClass(); if (clc.getName().equals("org.apache.catalina.loader.WebappClassLoader")) { Class[] classes = new Class[1]; Object[] parms = new Object[1]; classes[0] = String.class; parms[0] = codebase_url; m = clc.getMethod("addRepository", classes); m.invoke(cl, parms); } } catch (Exception e) {} // And if we're running Tomcat 3.x or a different AppServer completely. Do it the old way. if (m == null) { Properties p = System.getProperties(); p.put("java.rmi.server.codebase", codebase_url); System.setProperties(p); } -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>