| Author |
Exception during calling a entity bean from a standalone client
|
naveen babu
Greenhorn
Joined: Nov 10, 2004
Posts: 8
|
|
Hai all 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 rg.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"); } } ----------------------------------------------------------------------------
|
 |
 |
|
|
subject: Exception during calling a entity bean from a standalone client
|
|
|