This error was because the source code for AdviceClient.java provided by the authors tries to look up for "Test1" on JNDI look up where as they advise to register it as "Advisor" when deploying and hence JNDI lookup fails.
Thanks God, I have succeeded in compiling and running first example after struggling one whole week
I would like to suggest following for others who are starting first chapter of HFEJB
1. Use same version of J2SDK and J2EE
2. On windows use following command to compile
javac -classpath %CLASSPATH%;c:<YOUR_PATH>AdviceAppClient.jar AdviceClient.java (command given in book is good for Linux)
3. If you are using source code provided by authors make sure you open AdviceClient.jar and pay attention to this line
Object o = ic.lookup("Test1"); // replace with YOUR JNDI name for the bean
4. These notes by authors are also helpful NOTES BY AUTHORS
5. You might wana go through this errata by the publisher ERRATA
I hope no one else will stuck on the very first chapter for a week as I have been
Regards and thanks to all those who really helped me. Specail thanks to Dale_Seng for really helping me.
[ May 06, 2004: Message edited by: Alfred Harre ]