This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to resolve NoInitialContextException?

 
Mark Henryson
Ranch Hand
Posts: 200
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using, Head First EJB. I have encountered some problem while executing the example given in that book:

I am using Sun Application Server 8.. Windows 2000..

Exception
---------


Folder Structure
---------------------


Coding
-------

[ November 06, 2006: Message edited by: Mark Henryson ]
 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to have a jndi.properties file in the client's classpath. I am not sure about the exact contents for Sun App Server.
 
Micheal John
Ranch Hand
Posts: 344
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where the jndi.properties will be?
 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It should be in the classpath of the client which is doing the lookup. I am not quite sure about the contents for the Sun App Server. Here's what i could come up with the help of Google:



This is what your jndi.properties should contain. Give it a try and let us know if that doesnt work.
 
Sunil Huilgol
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use this to remove the exception :



You can use above context to look up your EJB.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic