Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
Originally posted by Kyle Brown:
You will also need to add ejs.jar to your classpath. Also, be certain that you are using IBM's JRE (the one that ships with WebSphere). Here's a sample batch file that I use for client programs in WebSphere 3.5 (taken from my book).
rem setup the classpath
SET WAS_HOME=I:\WebSphere\AppServer
SET JAVA_HOME=I:\WebSphere\AppServer\JDK\Jre
set WAS_CP=%WAS_CP%;%WAS_HOME%\lib\ejs.jar
set WAS_CP=%WAS_CP%;%WAS_HOME%\lib\ujc.jar
set WAS_CP=%WAS_CP%;%JAVA_HOME%\lib\classes.zip;
set WAS_CP=%WAS_CP%;hellowebsphereclient.jar;
rem start the client program
%JAVA_HOME%\bin\java -classpath %WAS_CP%;. com.ibm.ws.book.example.clients.HelloWebSphereEJBClient
Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
Originally posted by Kyle Brown:
I think this may be unrelated to the previous problem. Can you post a short snippet of your code that obtains the initial context (and maybe the EJB home)?
Kyle
P.S. Are you SURE you are using the IBM JRE that's in the WebSphere directory to start your program!!?? This is important!!!
Originally posted by Christine Li:
Hi, Please help
I deployed my CMP EJB in WebSphere3.5. I do not have problem to run servlet program which is also deployed in WebSphere3.5. but when i run my simple java class from JDK, my javaclass can not find the EJB home interface. I am getting NoClassDefError:
com.ibm.rmi.iiop.ORB
In my classpath setting, i put EJB client jar (exported from VisualAge for Java 3.5), UJC.jar from WebSphere/Appserver/lib (it includes CORBA.IIOP package). Could some one tell me what else I need add to the classpath?
or let me redress my question, could some one tell me which jar file of WAS3.5 contain com.ibm.rmi.iiop.ORB? or where can i find the file structure for WAS3.5?
Thank you very much for any kinds of suggestion.
Regards,
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |