1 Reply Latest reply on Dec 20, 2004 7:41 AM by Darran Lofthouse

    Exception during execution of Entity Bean Client

    Naveen Naveen Newbie

      I am executing a simple CMP entity bean

      while running the Client(StudentClient) i got this Error.
      --------------------------------------------------------------------------------------
      error in client javax.naming.CommunicationException [Root exception is java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
      java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
      java.lang.ClassNotFoundException: org.jnp.interfaces.FastNamingProperties (no security manager: RMI class loader disabled)]
      --------------------------------------------------------------------------------------

      my client code is

      --------------------------------------------------------------------------------------
      package student;

      import javax.ejb.*;
      import javax.naming.*;
      import java.rmi.*;
      import javax.rmi.*;
      import java.util.*;

      public class StudentClient
      {
      public static void main(String args[])
      {
      System.out.println("i am in start");
      StudentHome home=null;
      InitialContext jndiContext=null;
      try{

      Properties env = new Properties();
      //env.setProperty("InitialContext.INITIAL_CONTEXT_FACTORY","org.jboss.naming");
      env.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
      env.setProperty("java.naming.provider.url", "localhost:1099");
      env.setProperty("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");
      try{
      jndiContext = new InitialContext(env);
      }catch(Exception e){System.out.println("err in InitialCOntext");}
      try{
      home=(StudentHome)PortableRemoteObject.narrow(jndiContext.lookup("StudentHome"),StudentHome.class);
      }catch(Exception e){System.out.println("err in StudentHome");}
      try{
      home.create("Ammamn","A01");
      }catch(Exception e){System.out.println("err in HomeCreate");}
      }catch(Exception e){System.out.println("error in client"+e);}

      System.out.println("i am in end");
      }

      }

      --------------------------------------------------------------------------------------