Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!

Ramu

Greenhorn
+ Follow
since Dec 06, 2002
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ramu

Hi
I need FAQ's for WSAD.
Please help me any one.
bye
Ramu
19 years ago
Hi
I need frequently asked questions and answers for Web Sphere Application Server?
I need frequently asked questions and answers for Web Sphere Application Studio?
19 years ago
Hi
I will solve ur problem but send me ur entire application to me.
bye
Ramu
Hi
What is the difference between JavaBeans and EJB?
Hi
Any one can tell me please.
I need free hosting for EJB,Servlets,JSP,JDBC and HTML
Hi
Any one can help me Please.
How to Deploy Servlets in Weblogic Server 7.0?
I need Detail Procedure for this question.
bye
Ramu
19 years ago
HI,
Can you send me the Client File and EJB Files.
I will solve ur problem.
19 years ago
HI
Any one can help me please.
Where can I get good FAQ'S to IBM Web Sphere Application Server?
19 years ago
Hi
How to open ibm.ejb-jar-bnd.xmi in Application Assembly Tool?
I want open this file and modify it manually any one can help me please.
19 years ago
Hi
How to Deploy EJB using Websphere Application Assembly Tool?
If any body knows the detail procedure please tell me.
19 years ago
I deployed a Stateless Session bean in Web Sphere Application Server V4.0 AES.
I have written a client program too.
I am running client program in Command Prompt it is giving an error java
x.naming.NameNotFoundException
If anybody knows those steps please help me.
I am pasting all java classes also below.
Remote Interface
package naveen;
import javax.ejb.*;
import java.rmi.*;
public interface HelloRemote extends EJBObject{
public String sayHello() throws RemoteException;
}
Home Interface
package naveen;
import javax.ejb.*;
import java.rmi.*;
public interface HelloHome extends EJBHome{
public HelloRemote create() throws CreateException,RemoteException;
}
Bean Class
package naveen;
import javax.ejb.*;
import java.rmi.*;
public class Hello implements SessionBean{
public void ejbActivate(){}
public void ejbPassivate(){}
public void ejbRemove(){}
public void setSessionContext(SessionContext ctxt){}
public void ejbCreate(){}
public String sayHello(){

return "Welcome To EJB";
}
}
Client Program
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://localhost:900");
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");
System.out.println("Hello Client LookUP Initialize.....");
HelloHome hh=(HelloHome)o;
HelloRemote hr=hh.create();
System.out.println(hr.sayHello());
}
}
This program's output is it's printing "After context intialization"
After that error message
I am giving that error message also:
WSCL0100E: Exception received: java.lang.reflect.InvocationTargetException: java
x.naming.NameNotFoundException: HelloJndi
at com.ibm.ejs.ns.jndi.CNContextImpl.doLookup(CNContextImpl.java:1435)
at com.ibm.ejs.ns.jndi.CNContextImpl.lookup(CNContextImpl.java:1115)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at naveen.HelloClient.main(HelloClient.java:25)
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)
[ December 06, 2002: Message edited by: Tera Soft ]