Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

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

 
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.
 
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.
 
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.
 
Drove my Chevy to the levee but the levee was dry. A wrung this tiny ad and it was still dry.
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic