Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
harsha puttaswamy
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the compiler cant find the Advice classes you havent added the client jar file that the RI tool created to the CLASSPATH!
 
harsha puttaswamy
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Help, Anybody ??
 
harsha puttaswamy
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic