| Author |
How to resolve NoInitialContextException?
|
Mark Henryson
Ranch Hand
Joined: Jul 11, 2005
Posts: 200
|
|
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
Joined: Jul 20, 2005
Posts: 8209
|
|
|
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.
|
[My Blog] [JavaRanch Journal]
|
 |
Micheal John
Ranch Hand
Joined: Nov 01, 2006
Posts: 344
|
|
|
Where the jndi.properties will be?
|
Micheal John
SCJP 1.4 (86%), SCWCD 1.4 (86%), SCBCD 1.3 (85%), SCDJWS (Just Started...) - Satisfaction Lies in Our EFFORT, Not in the ATTAINMENT
|
 |
Jaikiran Pai
Marshal
Joined: Jul 20, 2005
Posts: 8209
|
|
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
Joined: Jan 22, 2006
Posts: 8
|
|
You can use this to remove the exception : You can use above context to look up your EJB.
|
 |
 |
|
|
subject: How to resolve NoInitialContextException?
|
|
|