dcsimg
JNDI Error Please help me any one
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   tera4_S
Posted On:   Monday, December 2, 2002 12:08 PM

Hi I deployed a session bean in Websphere. I have written a client program too. Client is unable to connect to the server. Is there any particular sequence of steps which we should folllow so that the client program can connect to server successfully. If anybody knows those steps please help me.. I'm pasting the Client code below.. thanx Ramu package naveen; import java.io.*; import java.util.*; import javax.naming.*; public class HelloClient{ public static void main(String a[]) throws Exception{ System.out.println("He   More>>

Hi

I deployed a session bean in Websphere. I have written a client program too. Client is unable to connect to the server.



Is there any particular sequence of steps which we should folllow so that the client program can connect to server successfully. If anybody knows those steps please help me..



I'm pasting the Client code below..



thanx
Ramu



package naveen;



import java.io.*;


import java.util.*;


import javax.naming.*;



public class HelloClient{




public static void main(String a[]) throws Exception{



System.out.println("Hello Client Main Method Called...");


Hashtable h=new Hashtable();



h.put(Context.PROVIDER_URL,"iiop:///");


h.put(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.websphere.naming.WsnInitialContextFactory");


System.out.println("Hello Client before context intialization...");



Context ctxt=new InitialContext(h);



System.out.println("Hello Client after context initialization..."); .



Object o=ctxt.lookup("HelloJndi");



HelloHome hh=(HelloHome)o;



HelloRemote hr=hh.create();



System.out.println(hr.sayHello());


}


}



This program's output is it's printing "Before context intialization"


After that error message



I am giving that error message also:



WSCL0100E: Exception received:

java.lang.reflect.InvocationTargetException: java
x.naming.CommunicationException: Caught CORBA.COMM_FAILURE when resolving initia
l reference=WsnNameService. Root exception is

org.omg.CORBA.COMM_FAILURE: min
or code: 3 completed: No


at com.ibm.CORBA.iiop.HTTPConnection.send(HTTPConnection.java:439)


at com.ibm.CORBA.iiop.HTTPConnection.locate(HTTPConnection.java:659)


at com.ibm.CORBA.iiop.GIOPImpl.locate(GIOPImpl.java:172)


at com.ibm.CORBA.iiop.ClientDelegate.createRequest(ClientDelegate.java:1
016)


at com.ibm.CORBA.iiop.InitialNamingClient.resolve(InitialNamingClient.ja
va:372)


at com.ibm.CORBA.iiop.InitialNamingClient.cachedInitialReferences(Initia
lNamingClient.java:591)


at com.ibm.CORBA.iiop.InitialNamingClient.resolve_initial_references(Ini
tialNamingClient.java:355)


at com.ibm.CORBA.iiop.ORB.resolve_initial_references(ORB.java:1753)


at com.ibm.ws.naming.util.WsnInitCtxFactory.mergeWsnNSProperties(WsnInit
CtxFactory.java:566)


at com.ibm.ws.naming.util.WsnInitCtxFactory.getRootJndiContext(WsnInitCt
xFactory.java:328)


at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContext(WsnInitCtx
Factory.java:200)


at com.ibm.websphere.naming.WsnInitialContextFactory.getInitialContext(W
snInitialContextFactory.java:80)


at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
69)


at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247
)


at javax.naming.InitialContext.init(InitialContext.java:223)


at javax.naming.InitialContext. (InitialContext.java:199)


at naveen.HelloClient.main(HelloClient.java:18)


at java.lang.reflect.Method.invoke(Native Method)


at com.ibm.websphere.client.applicationclient.launchClient.createContain
erAndLaunchApp(launchClient.java:430)


at com.ibm.websphere.client.applicationclient.launchClient.main(launchCl
ient.java:288)


at java.lang.reflect.Method.invoke(Native Method)


at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:158)

   <<Less

Re: JNDI Error Please help me any one

Posted By:   Simon_Johnson  
Posted On:   Tuesday, December 17, 2002 10:14 PM

Have you solved the problem?

You had better check your classpath setting:
1) websphere.jar
2) deployed HelloEJB.jar
should be there.

SJ
About | Sitemap | Contact