[jboss-dev-forums] [Design of POJO Server] - Re: Missing org.jnp.server.NamingServer_Stub

adrian@jboss.org do-not-reply at jboss.com
Fri Nov 21 08:19:00 EST 2008


"adrian at jboss.org" wrote : 
  | Can you try getting jboss-4.2.x to ignore stub classes and always use dynamic proxies?
  | i.e. start jboss-4.2.x with -Djava.rmi.server.ignoreStubClasses=true

If I do that, then a 5.0.x -> 4.2.x lookup works.
Here's a simple jsp page (you'll need to change the provider url)

  | <%@page contentType="text/html"
  |    import="java.util.Properties,javax.naming.*"
  | %>
  | 
  | <%
  |   Properties props = new Properties();
  |   props.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
  |   props.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
  |   props.put("java.naming.provider.url", "127.0.0.1:1099");
  |   InitialContext ctx = new InitialContext(props);
  |   Object obj = ctx.lookup("jmx/rmi/RMIAdaptor");
  | %>
  | <body>
  |   Got <%= obj %> of type <%= obj.getClass() %>
  | <body>
  | </body>
  | </html>
  | 

But a 4.2.x -> 5.0.x lookup fails because of the new interface:


  | javax.naming.CommunicationException: Failed to connect to server 127.0.0.1:1099 [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingEvents (no security manager: RMI class loader disabled)]
  | 	org.jnp.interfaces.NamingContext.getServer(NamingContext.java:274)
  | 	org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1533)
  | 	org.jnp.interfaces.NamingContext.lookup(NamingContext.java:634)
  | 	org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
  | 	javax.naming.InitialContext.lookup(InitialContext.java:351)
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4191244#4191244

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4191244



More information about the jboss-dev-forums mailing list