• Post Reply Bookmark Topic Watch Topic
  • New Topic

deploy ejb in websphere

Jyotisree Dhar
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am new to websphere application server, i have started to work on websphere from last two days. I have successfully deployed the web application in websphere and it works fine but i am having problem when i execute the client program of EJB.
What i done is? First i create a simple session bean in Visual age for java and later export a jar file in a local directory for deploy it in websphere then i deployed this jar in websphere successfully without any error.But when i execute a client program ,it's showing me a error.I think , it is not connecting to server.
My Client code is:
package pak1;
import java.util.*;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.rmi.PortableRemoteObject;
public class testclient {

public static void main(String[] args) {
try {
System.out.println("1 steps");
Properties ht = new Properties();
System.out.println("2 steps");
System.out.println("3 steps");

Context ctx = new InitialContext(ht);
System.out.println("4 steps");
java.lang.Object objref = ctx.lookup("testsessionHome");
ejbpkj.testsessionHome home

ejbpkj.testsession custrem=home.create();
String msg=custrem.disp();
System.out.print("The Message is :-" + msg);

}catch(Exception e)
And The Error is:
E:\testejbclient>java pak1.testclient
1 steps
2 steps
3 steps
Exception in thread "main" java.lang.NoClassDefFoundError: com/ibm/rmi/iiop/ORB
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:11
at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:195)
at org.omg.CORBA.ORB.create_impl(ORB.java:284)
at org.omg.CORBA.ORB.init(ORB.java:328)
at com.ibm.CORBA.iiop.GlobalORBFactory.init(GlobalORBFactory.java:42)
at com.ibm.ejs.oa.EJSORBImpl.initializeORB(EJSORBImpl.java:196)
at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:93)
at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:65)
at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:47)
at com.ibm.ejs.oa.EJSORB.init(EJSORB.java:343)
at com.ibm.ejs.ns.jndi.CNInitialContextFactory.initORB(CNInitialContextF
at com.ibm.ejs.ns.jndi.CNInitialContextFactory.getInitialContext(CNIniti
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246
at javax.naming.InitialContext.init(InitialContext.java:222)
at javax.naming.InitialContext.<init>(InitialContext.java:198)
at pak1.testclient.main(testclient.java:29)

I have followed all the basic steps like first execute setenv in command prompt and then set the classpath of ejb jar file .
I can not solve it ,Please help me some body.
[This message has been edited by jyotisree (edited September 15, 2001).]
[This message has been edited by jyotisree (edited September 16, 2001).]
Craig Berry
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which JVM are you executing the client in? I believe you need to use the IBM JVM that ships with WAS in order to access EJBs in WAS.
Craig Berry
Author of Professional EJB
Jyotisree Dhar
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Craig,
i was stuck with this for a week.I changed the path to IBM JVM and it worked.

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!