1 Reply Latest reply on Apr 18, 2003 12:55 AM by mcschmidt_00

    Accessing localhome objects from a simple client

    markcng Newbie

      Hi All,

      I'm try to access LocalHome object from a test client as follows

      //Local lookup
      ctx = new InitialContext(properties);
      obj = ctx.lookup("ejb/LocalHi");
      TestHelloLocalHome localhome = (TestHelloLocalHome) obj;//PortableRemoteObject.narrow(obj,TestHelloLocalHome.class);
      TestHelloLocal hellolocal = localhome.create();

      However i get the following error;
      javax.naming.CommunicationException [Root exception is java.lang.ClassNotFoundException: org.jboss.ejb.plugins.local.LocalHomeProxy (no security manager: RMI class loader disabled)

      Any help would be much appreciated


        • 1. Re: Accessing localhome objects from a simple client
          mcschmidt_00 Newbie

          It's hard to tell from your post where you're trying to access the object from. Local interfaces are mostly for accessing from another EJB, as they have to be accessed from within the same JVM. If you're trying to access from a stand alone client or servlet I don't think it'll work.

          Also, is the PortableRemoteObject.narrow call commented out? You don't use that for calls on local interfaces, it only for use on remote interfaces. Use a simple downcast.