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

InitialContext.lookup(Unknown Source)

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am trying the example from HFEJB (AdviceBean).
I've deployed it successfully on Sun Application Server, but when I was trying to run the AdviceClient, I got the exceptions as below:
_____________________________________________________________________
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(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.lookup(Unknown Source)
at HFEJB.ch1.AdviceClient.go(AdviceClient.java:28)
at HFEJB.ch1.AdviceClient.main(AdviceClient.java:19)
______________________________________________________________________

Can anyone tell me what's the problem?

Thx in advance.
 
Ranch Hand
Posts: 271
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is your app server actually running?If so , then maybe this http://www.osjava.org/simple-jndi/FAQ.html

jeff mutonho
 
Allan Stone
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jeff,

Thanks for the reply. The App Server is sure running OK. I guess the problem is I don't have a jndi.properties file in my classpath.

But where can I find one for my application?
[ November 22, 2005: Message edited by: Allan Li ]
 
Where does a nanny get ground to air missles? Protect this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic