Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

pls help me in solving CommunicationException: Request: 1 cancelled

p anish
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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();
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(
at com.sun.jndi.ldap.Connection.readReply(
at com.sun.jndi.ldap.LdapClient.ldapBind(
at com.sun.jndi.ldap.LdapClient.authenticate(
at com.sun.jndi.ldap.LdapCtx.connect(
at com.sun.jndi.ldap.LdapCtx.<init>(
at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(

at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(
at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.ja
at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.jav
at javax.naming.spi.NamingManager.getInitialContext(
at javax.naming.InitialContext.getDefaultInitCtx(
at javax.naming.InitialContext.init(
at javax.naming.InitialContext.<init>(
at com.parx.lms.lmsdelegate.LmsDelegate.getController(
at com.parx.lms.lmsdelegate.LmsDelegate.addUserDelegate(
at com.parx.lms.client.consoleClient.Client.main(Unknown Source)

pls go tru the exception and pls help.........
Ken Loh
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your question has been answered in the same posting of yours at
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic