File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes need help with running the client for HFEJB's 1st example Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "need help with running the client for HFEJB Watch "need help with running the client for HFEJB New topic
Author

need help with running the client for HFEJB's 1st example

harsha puttaswamy
Greenhorn

Joined: Mar 05, 2005
Posts: 24
Hi all,

I have downloaded and installed the 1.3 version of the j2ee server. I have created and deployed the Advice bean as per the first bean example in HFEJB book.

I created the client program and I am trying to compile it per the book, but, I keep getting errors saying the home, component interfaces cannot be resolved and cannot find javax.ejb.*

I have the environment variables as follows :-
1) CLASSPATH=c:\j2sdk1.4.2_04\lib\j2ee.jar;c:\j2sdkee1.3.1\lib\j2ee.jar
2) J2EE_HOME=c:\j2sdkee1.3.1
3) JAVA_HOME=c:\j2sdk1.4.2_06
4) To PATH, C:\j2sdk1.4.2_06\bin;c:\j2sdkee1.3.1\bin - has been added.

Please let me know what I am missing. I am trying to break my head for the past couple of days on this issue.

Thanks,
Harsha.
Andree Charfen
Ranch Hand

Joined: Mar 24, 2004
Posts: 32
If the compiler cant find the Advice classes you havent added the client jar file that the RI tool created to the CLASSPATH!


yeeeehhhhaaaaaa<br />(riding the JVM)
harsha puttaswamy
Greenhorn

Joined: Mar 05, 2005
Posts: 24
Thanks. I missed that one. Added the client jar file to the CLASSPATH and was able to compile successfully.

But, when I executed it, came across a runtime error :-

Exception in thread "main" java.lang.NoClassDefFoundError: adviceclient

Could this be because I have the 1.4 version of Java on my machine ???

Thanks again,
Harsha.
Sudhakar Krishnamurthy
Ranch Hand

Joined: Jun 02, 2003
Posts: 76
Harsha,
Even i had the same problem and i followed this link to fix it http://wickedlysmart.com/HeadFirst/HeadFirstEJB/HeadFirstEJBNotes.html
harsha puttaswamy
Greenhorn

Joined: Mar 05, 2005
Posts: 24
Thanks Sudhakar. I changed the business method name to have different characters compared to the Component Interface name. I undeployed and did the whole nine yards again and I am still getting the

"Exception in thread "main" java.lang.NoClassDefFoundError: AdviceClient" error at runtime.

I am not getting any CORBA related errors, atleast, not yet.

Can somebody please help me ?

Thanks,
Harsha.
harsha puttaswamy
Greenhorn

Joined: Mar 05, 2005
Posts: 24
Help, Anybody ??
harsha puttaswamy
Greenhorn

Joined: Mar 05, 2005
Posts: 24
I got past this. I had to modify the CLASSPATH to include the directory where the client program resides. Just going back to basics.

Thanks,
Harsha.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: need help with running the client for HFEJB's 1st example