1 Reply Latest reply on Oct 13, 2002 9:00 AM by Juha Lindfors

    Local EJB - Why can't I call a Local Session Bean? URGENT

    Binh Newbie

      I write a very simple example, Hello Local and using JBuilder to deploy my bean. When I run on JBoss 3.0.2, I can't look up the bean?

      This is my client's code:
      ------
      Properties props = new Properties();
      Context ctx = new InitialContext(props);

      HelloLocalHome home = (HelloLocalHome) ctx.lookup("HelloLocal");

      HelloLocal hello = home.create();
      System.out.println(hello.hello());
      hello.remove();
      ----
      Very simple isn't it?
      Here is the error message:
      ----
      javax.naming.CommunicationException. Root exception is java.lang.ClassNotFoundException: org.jboss.ejb.plugins.local.LocalHomeProxy (no security manager: RMI class loader disabled)

      at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:318)

      at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:132)

      at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:143)

      at java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java:918)

      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:366)

      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)

      at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1186)

      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)

      at java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:2262)

      at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:519)

      at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1411)

      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)

      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)

      at java.rmi.MarshalledObject.get(MarshalledObject.java:138)

      at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:30)

      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:460)

      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:440)

      at javax.naming.InitialContext.lookup(InitialContext.java:350)

      at testlocal.TestClient.main(TestClient.java:19)

      Exception in thread "main"
      -----

      Can you tell me the cause and how to solve it?
      Thanks