• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HFE - Advice Client App

 
Santosh Ramachandrula
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Dale Seng
Ranch Hand
Posts: 275
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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--
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic