how can i lookup a session bean from the client side...........i am using sun appserver..............
this is my code.................[B]
private final static String JNDI_NAME="ejb/LmsBean";
private static String url="ldap://localhost:4848";
Hashtable h=new Hashtable();
h.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
h.put(Context.PROVIDER_URL,url);
System.out.println("Before Loading Context in Delegate");
Context ctx=new InitialContext(h);
System.out.println("Loaded Context in Delegate");
Object obj=ctx.lookup(JNDI_NAME);
System.out.println("Loaded Object in Delegate");
System.out.println("Before Loading Home in Delegate");
LmsHome home = (LmsHome )PortableRemoteObject.narrow(obj,com.parx.lms.controller.LmsHome.class);
System.out.println("Loaded Home in Delegate");
lms = home.create();
System.out.println("Loaded remote in Delegate");
[B]and i got the exception........ Inside Client before calling delegate
Before Loading Context in Delegate
javax.naming.CommunicationException: Request: 1 cancelled javax.naming.CommunicationException: Request: 1 cancelled
at com.sun.jndi.ldap.LdapRequest.getReplyBer(LdapRequest.java:60)
at com.sun.jndi.ldap.Connection.readReply(Connection.java:405)
at com.sun.jndi.ldap.LdapClient.ldapBind(LdapClient.java:340)
at com.sun.jndi.ldap.LdapClient.authenticate(LdapClient.java:171)
at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2640)
at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:290)
at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175)
at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193
)
at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.ja
va:136)
at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.jav
a:66)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
62)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243
)
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext.<init>(InitialContext.java:195)
at com.parx.lms.lmsdelegate.LmsDelegate.getController(LmsDelegate.java:3
0)
at com.parx.lms.lmsdelegate.LmsDelegate.addUserDelegate(LmsDelegate.java
:50)
at com.parx.lms.client.consoleClient.Client.main(Unknown Source)
pls go tru the exception and pls help.........