Hi,
I am using a applet as a client.From client I can't get Context.The exception is..........
javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interf
aces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: o
rg.jnp.interfaces.NamingContextFactory]
Code of Client applet is..............
try{
Hashtable env=new Hashtable();
env.put(Context.PROVIDER_URL,"jnp://localhost:1099");
env.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
Context ctx=new InitialContext(env);
System.out.println("got context");
Object objref1=(VoucherHome)ctx.lookup("Voucher");
VoucherHome home=(VoucherHome)javax.rmi.PortableRemoteObject.narrow(objref1,VoucherHome.class);
Voucher voucher=home.create();
if(voucher.dataRetrive(superPanel.usernamePasswordPanel.txtUsername.getText(),superPanel.usernamePasswordPanel.txtPassword.getText())){
superPanel.cardLayout.show(superPanel,"TopPanel");
}
}catch(Exception e){
System.out.println(e);
}
Class path:
%systemroot%\java\classes;C:\jboss-3.2.7\client\jnp-client.jar;c:\common.jar;C:\jboss-3.2.7\lib\hibernate3.jar;c:\jboss-3.2.7\client\log4j.jar;c:\jboss-3.2.7\client\jboss-common-client.jar;c:\jboss-3.2.7\client\jboss-j2ee.jar;c:\jboss-3.2.7\server\default\lib\jboss-transaction.jar;c:\jboss-3.2.7\server\default\lib\jnpserver.jar;c:\jboss-3.2.7\server\default\lib\jboss.jar;c:\jboss-3.2.7\lib\jboss-common.jar;c:\jboss-3.2.7\server\all\lib\jbossall-client.jar;c:\jboss-3.2.7\server\all\lib\jnp-client.jar;c:\jboss-3.2.7\server\all\lib\jboss-net-client.jar;c:\jboss-3.2.7\server\all\lib\jaas.jar;
I put jndi.properties file also....it is here
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=jnp://localhost:1099
java.naming.factory.url.pkgs=org.jnp.interfaces
Please Help..........
Do it yourself?
:)