aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes pls help me in solving CommunicationException: Request: 1 cancelled Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "pls help me in solving CommunicationException: Request: 1 cancelled" Watch "pls help me in solving CommunicationException: Request: 1 cancelled" New topic
Author

pls help me in solving CommunicationException: Request: 1 cancelled

p anish
Ranch Hand

Joined: Feb 26, 2005
Posts: 32
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.........
Ken Loh
Ranch Hand

Joined: Feb 16, 2005
Posts: 190
Your question has been answered in the same posting of yours at http://forum.java.sun.com/thread.jspa?threadID=609290&tstart=45.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: pls help me in solving CommunicationException: Request: 1 cancelled