as long as you get the NameNotFoundException you don't have to worry about the rest of your code. This is only related to JNDI and lookup problems.
It may depend on the application server how exactly the lookup name has to be specified. In case of JBoss it's usually the full path down the JNDI tree if I remember it correctly. In this case I think you have to change the lookup to instead. As you see this one also gives the top level name which is usually the name of your project/application.
I hope this helps
[ August 31, 2008: Message edited by: Marco Ehrentreich ] [ August 31, 2008: Message edited by: Marco Ehrentreich ]
Joined: Jan 10, 2003
thank you very very much. It was exactly how you wrote it. I have to say that I became desperate in facing this problem.
I'm glad to hear that your problem is solved now I guess almost everyone who is trying to get some enterprise examples up and running is facing these problems with the JNDI lookup. Unfortunately this is often not even mentioned in examples or tutorials that the lookup name may be application server specific. The best thing you can do is to look carefully at such exceptions before you start changing some parts of the code...
Joined: Sep 08, 2008
Did any one try dependency injection in the client.
I could not make it work in 4.2.3.
It worked in 5, after adding mappedName and setting the callByValue to true in the JMX console
what "clients" are you exactly talking about? Standalone applications or other enterprise beans? Anyway, as far as I know dependency injection is part of J2EE 5.0 and JBoss 4.x officially only supports J2EE 1.4. This is probably the reason why it doesn't work in these versions.
For JBoss 5.x I don't have any experiences but I think it could easily be a naming problem with JNDI like the problems described above. If everything else is working correctly the JBoss server logs should tell you if that's the problem.