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 HFE - Advice Client App Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Reply Bookmark "HFE - Advice Client App" Watch "HFE - Advice Client App" New topic
Author

HFE - Advice Client App

Santosh Ramachandrula
Ranch Hand

Joined: Apr 04, 2004
Posts: 252
Hello Guys,
I am trying to run the AdviceApp enterprise bean. The code compiles but when I run the AdviceClient I get the following errors.....
using SUN APP SERVER 8.0
I looked around the net and found that JSDK has to be consistent on the machine so I uninstalled JSDK/J2EE SDK on my machine and re-installed everthing (even the app server). Now the JSDK version is consistent
java version "1.4.2_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b04)
Java HotSpot(TM) Client VM (build 1.4.2_04-b04, mixed mode)
This did not fix the error..

Any help would be appreciated....
-------------------------------errors----------------------------
C:\Sun\AppServer\domains\domain1\applications\j2ee-apps\AdviceApp>javac -classpath AdviceAppClient.jar;C:\Sun\AppServer\lib\j2ee.jar;.; AdviceClient.java
C:\Sun\AppServer\domains\domain1\applications\j2ee-apps\AdviceApp>java -classpath AdviceAppClient.jar;C:\Sun\AppServer\lib\j2ee.jar;.; AdviceClient
javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:640)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:280)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at AdviceClient.go(AdviceClient.java:39)
at AdviceClient.main(AdviceClient.java:18)
[ May 01, 2004: Message edited by: Santosh Ram ]

Thanks,
Santosh
Dale Seng
Ranch Hand

Joined: Mar 22, 2004
Posts: 275
Here's what I used to run the client, FWIW:

Here's what I have for the go method. It has a bit more than what you find in the book WRT initial context. Sometimes I find if I just start trying different things, something will fall-out...

Good luck.
--Dale--
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: HFE - Advice Client App
 
Similar Threads
Running the headfirst ejb 1st chapter
Running the headfirst ejb 1st chapter - problem running
problem on hfejsb page 57
Advice Client problem
AdviceClient again!!