Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

HFE - Advice Client App

 
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 ]
 
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--
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic