Sorry,the error is
javax.Naming.NoInitialContextException : Cannot instantiate class :
org.jnp.interfaces.NamingContextFactory [root exception is
java.lang.ClassNotFoundException org.jnp.interfaces.NamingContextFactory
I have changed the client code into a simple one and set all the properties as
suggested by many persons but still error is there.
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");
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");
InitialContext jndiContext = new InitialContext(env);
StudentHome
home=(StudentHome)PortableRemoteObject.narrow(jndiContext.lookup("StudentHome"),StudentHome.class);
home.create("Ammamn","A01");
}catch(Exception e){System.out.println("error in client"+e);}
System.out.println("i am in end");
}
}
------------------------------------------------------------
pls clear me
1)what r the client jars i have to include in classpath.
2)Is there is any seperate xml file i have to write for client.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3857311#3857311
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3857311
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user